mirror of
https://github.com/bbswitzer/PianoProject
synced 2026-10-22 01:03:05 -04:00
Add project files.
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
#include "lcd.h"
|
||||
#include "serial.h"
|
||||
#include "input.h"
|
||||
|
||||
void changeSetting(int changeBy)
|
||||
{
|
||||
if(currentMenu != static_cast<int>(SettingID::SCHEDULE_NOTES) &&
|
||||
currentMenu != static_cast<int>(SettingID::HANDLE_NOTES)) //if current menu is not a boolean menu
|
||||
EEPROM.write(currentMenu, EEPROM.read(currentMenu) + changeBy);
|
||||
else
|
||||
EEPROM.write(currentMenu, !(static_cast<boolean>(EEPROM.read(currentMenu))));
|
||||
}
|
||||
|
||||
void sendAllSettings()
|
||||
{
|
||||
for(int index = 0; index < NUM_OF_MENUS; index++)
|
||||
{
|
||||
sendSerialToMain(SerialConstants::SETTING_HEADER, index, EEPROM.read(index));
|
||||
delay(50);
|
||||
}
|
||||
sendSerialToMain(SerialConstants::VOLUME_HEADER, lastAnalog, lastAnalog);
|
||||
}
|
||||
Reference in New Issue
Block a user