basic button support

pull/164/head
Unknown 2022-05-11 17:33:32 -05:00
parent 3e3a8859a9
commit 2aebb46823
2 changed files with 17 additions and 0 deletions

View File

@ -114,6 +114,7 @@ void Watchy::handleButtonPress() {
} else if (guiState == FW_UPDATE_STATE) {
showMenu(menuIndex, false); // exit to menu if already in app
} else if (guiState == WATCHFACE_STATE) {
button1();
return;
}
}
@ -126,6 +127,7 @@ void Watchy::handleButtonPress() {
}
showMenu(menuIndex, true);
} else if (guiState == WATCHFACE_STATE) {
button2();
return;
}
}
@ -138,6 +140,7 @@ void Watchy::handleButtonPress() {
}
showMenu(menuIndex, true);
} else if (guiState == WATCHFACE_STATE) {
button3();
return;
}
}
@ -579,6 +582,17 @@ void Watchy::drawWatchFace() {
display.println(currentTime.Minute);
}
void Watchy::button1()
{
}
void Watchy::button2()
{
}
void Watchy::button3()
{
}
weatherData Watchy::getWeatherData() {
return getWeatherData(settings.cityID, settings.weatherUnit,
settings.weatherLang, settings.weatherURL,

View File

@ -73,6 +73,9 @@ public:
void showWatchFace(bool partialRefresh);
virtual void drawWatchFace(); // override this method for different watch
// faces
virtual void button1(); // override these methods to handle different non-menu button presses
virtual void button2();
virtual void button3();
private:
void _bmaConfig();