Extracted staffVolumeUp to seperate file
All checks were successful
Build Code / build (push) Successful in 1m15s
All checks were successful
Build Code / build (push) Successful in 1m15s
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#include <potControlls.h>
|
||||
#include <ledControlls.h>
|
||||
#include <userFunctions.h>
|
||||
#include <staffFunctions.h>
|
||||
|
||||
int maxVolume = 64;
|
||||
int userVolume = 64;
|
||||
@@ -48,10 +49,7 @@ void loop()
|
||||
// SW1 - Staff Volume Up
|
||||
if (!debounceRead(BTN_STAFF_UP))
|
||||
{
|
||||
if (maxVolume < 100)
|
||||
{
|
||||
maxVolume += STAFF_STEPS;
|
||||
}
|
||||
staffVolumeUp(&maxVolume);
|
||||
}
|
||||
|
||||
// SW2 - Staff Volume Down
|
||||
|
||||
10
src/staffFunctions.cpp
Normal file
10
src/staffFunctions.cpp
Normal file
@@ -0,0 +1,10 @@
|
||||
#include <staffFunctions.h>
|
||||
#include <constants.h>
|
||||
|
||||
void staffVolumeUp(int *maxVolume)
|
||||
{
|
||||
if (*maxVolume < 64)
|
||||
{
|
||||
*maxVolume += STAFF_STEPS;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user