Compare commits

...

3 Commits

Author SHA1 Message Date
bushmango 634ae656c3
Merge 2aebb46823 into 41d8917c76 2024-07-03 16:46:46 +01:00
SQFMI 41d8917c76 Fix issue with display SPI pins 2024-07-02 17:23:50 -04:00
Unknown 2aebb46823 basic button support 2022-05-11 17:33:32 -05:00
6 changed files with 23 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{
"name": "Watchy",
"version": "1.4.11",
"version": "1.4.12",
"description": "Watchy - An Open Source E-Paper Watch by SQFMI",
"authors": [
{

View File

@ -1,5 +1,5 @@
name=Watchy
version=1.4.11
version=1.4.12
author=SQFMI
maintainer=SQFMI
sentence=Watchy - An Open Source E-Paper Watch by SQFMI

View File

@ -28,6 +28,9 @@ WatchyDisplay::WatchyDisplay() :
GxEPD2_EPD(DISPLAY_CS, DISPLAY_DC, DISPLAY_RES, DISPLAY_BUSY, HIGH, 10000000, WIDTH, HEIGHT, panel, hasColor, hasPartialUpdate, hasFastPartialUpdate)
{
// Setup callback and SPI by default
#ifdef ARDUINO_ESP32S3_DEV
SPI.begin(WATCHY_V3_SCK,WATCHY_V3_MISO,WATCHY_V3_MOSI,WATCHY_V3_SS);
#endif
selectSPI(SPI, SPISettings(20000000, MSBFIRST, SPI_MODE0));
setBusyCallback(busyCallback);
}

View File

@ -161,6 +161,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;
}
}
@ -173,6 +174,7 @@ void Watchy::handleButtonPress() {
}
showMenu(menuIndex, true);
} else if (guiState == WATCHFACE_STATE) {
button2();
return;
}
}
@ -185,6 +187,7 @@ void Watchy::handleButtonPress() {
}
showMenu(menuIndex, true);
} else if (guiState == WATCHFACE_STATE) {
button3();
return;
}
}
@ -666,6 +669,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.lat, settings.lon,
settings.weatherUnit, settings.weatherLang, settings.weatherURL,

View File

@ -99,6 +99,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();

View File

@ -2,7 +2,7 @@
#define CONFIG_H
// Versioning
#define WATCHY_LIB_VER "1.4.11"
#define WATCHY_LIB_VER "1.4.12"
//pins
//#if !defined(ARDUINO_WATCHY_V10) && !defined(ARDUINO_WATCHY_V15) && !defined(ARDUINO_WATCHY_V20)