diff --git a/examples/WatchFaces/7_SEG/settings.h b/examples/WatchFaces/7_SEG/settings.h index 654a219..e4f2669 100644 --- a/examples/WatchFaces/7_SEG/settings.h +++ b/examples/WatchFaces/7_SEG/settings.h @@ -13,14 +13,15 @@ #define GMT_OFFSET_SEC 3600 * -5 //New York is UTC -5 EST, -4 EDT watchySettings settings{ - CITY_ID, - OPENWEATHERMAP_APIKEY, - OPENWEATHERMAP_URL, - TEMP_UNIT, - TEMP_LANG, - WEATHER_UPDATE_INTERVAL, - NTP_SERVER, - GMT_OFFSET_SEC + .cityID = CITY_ID, + .weatherAPIKey = OPENWEATHERMAP_APIKEY, + .weatherURL = OPENWEATHERMAP_URL, + .weatherUnit = TEMP_UNIT, + .weatherLang = TEMP_LANG, + .weatherUpdateInterval = WEATHER_UPDATE_INTERVAL, + .ntpServer = NTP_SERVER, + .gmtOffset = GMT_OFFSET_SEC, + .vibrateOClock = true, }; #endif \ No newline at end of file diff --git a/examples/WatchFaces/Basic/settings.h b/examples/WatchFaces/Basic/settings.h index 654a219..53d47e3 100644 --- a/examples/WatchFaces/Basic/settings.h +++ b/examples/WatchFaces/Basic/settings.h @@ -13,14 +13,14 @@ #define GMT_OFFSET_SEC 3600 * -5 //New York is UTC -5 EST, -4 EDT watchySettings settings{ - CITY_ID, - OPENWEATHERMAP_APIKEY, - OPENWEATHERMAP_URL, - TEMP_UNIT, - TEMP_LANG, - WEATHER_UPDATE_INTERVAL, - NTP_SERVER, - GMT_OFFSET_SEC + .cityID = CITY_ID, + .weatherAPIKey = OPENWEATHERMAP_APIKEY, + .weatherURL = OPENWEATHERMAP_URL, + .weatherUnit = TEMP_UNIT, + .weatherLang = TEMP_LANG, + .weatherUpdateInterval = WEATHER_UPDATE_INTERVAL, + .ntpServer = NTP_SERVER, + .gmtOffset = GMT_OFFSET_SEC, }; #endif \ No newline at end of file diff --git a/examples/WatchFaces/DOS/settings.h b/examples/WatchFaces/DOS/settings.h index 654a219..53d47e3 100644 --- a/examples/WatchFaces/DOS/settings.h +++ b/examples/WatchFaces/DOS/settings.h @@ -13,14 +13,14 @@ #define GMT_OFFSET_SEC 3600 * -5 //New York is UTC -5 EST, -4 EDT watchySettings settings{ - CITY_ID, - OPENWEATHERMAP_APIKEY, - OPENWEATHERMAP_URL, - TEMP_UNIT, - TEMP_LANG, - WEATHER_UPDATE_INTERVAL, - NTP_SERVER, - GMT_OFFSET_SEC + .cityID = CITY_ID, + .weatherAPIKey = OPENWEATHERMAP_APIKEY, + .weatherURL = OPENWEATHERMAP_URL, + .weatherUnit = TEMP_UNIT, + .weatherLang = TEMP_LANG, + .weatherUpdateInterval = WEATHER_UPDATE_INTERVAL, + .ntpServer = NTP_SERVER, + .gmtOffset = GMT_OFFSET_SEC, }; #endif \ No newline at end of file diff --git a/examples/WatchFaces/MacPaint/settings.h b/examples/WatchFaces/MacPaint/settings.h index 654a219..53d47e3 100644 --- a/examples/WatchFaces/MacPaint/settings.h +++ b/examples/WatchFaces/MacPaint/settings.h @@ -13,14 +13,14 @@ #define GMT_OFFSET_SEC 3600 * -5 //New York is UTC -5 EST, -4 EDT watchySettings settings{ - CITY_ID, - OPENWEATHERMAP_APIKEY, - OPENWEATHERMAP_URL, - TEMP_UNIT, - TEMP_LANG, - WEATHER_UPDATE_INTERVAL, - NTP_SERVER, - GMT_OFFSET_SEC + .cityID = CITY_ID, + .weatherAPIKey = OPENWEATHERMAP_APIKEY, + .weatherURL = OPENWEATHERMAP_URL, + .weatherUnit = TEMP_UNIT, + .weatherLang = TEMP_LANG, + .weatherUpdateInterval = WEATHER_UPDATE_INTERVAL, + .ntpServer = NTP_SERVER, + .gmtOffset = GMT_OFFSET_SEC, }; #endif \ No newline at end of file diff --git a/examples/WatchFaces/Pokemon/settings.h b/examples/WatchFaces/Pokemon/settings.h index 654a219..53d47e3 100644 --- a/examples/WatchFaces/Pokemon/settings.h +++ b/examples/WatchFaces/Pokemon/settings.h @@ -13,14 +13,14 @@ #define GMT_OFFSET_SEC 3600 * -5 //New York is UTC -5 EST, -4 EDT watchySettings settings{ - CITY_ID, - OPENWEATHERMAP_APIKEY, - OPENWEATHERMAP_URL, - TEMP_UNIT, - TEMP_LANG, - WEATHER_UPDATE_INTERVAL, - NTP_SERVER, - GMT_OFFSET_SEC + .cityID = CITY_ID, + .weatherAPIKey = OPENWEATHERMAP_APIKEY, + .weatherURL = OPENWEATHERMAP_URL, + .weatherUnit = TEMP_UNIT, + .weatherLang = TEMP_LANG, + .weatherUpdateInterval = WEATHER_UPDATE_INTERVAL, + .ntpServer = NTP_SERVER, + .gmtOffset = GMT_OFFSET_SEC, }; #endif \ No newline at end of file diff --git a/examples/WatchFaces/StarryHorizon/settings.h b/examples/WatchFaces/StarryHorizon/settings.h index 654a219..53d47e3 100644 --- a/examples/WatchFaces/StarryHorizon/settings.h +++ b/examples/WatchFaces/StarryHorizon/settings.h @@ -13,14 +13,14 @@ #define GMT_OFFSET_SEC 3600 * -5 //New York is UTC -5 EST, -4 EDT watchySettings settings{ - CITY_ID, - OPENWEATHERMAP_APIKEY, - OPENWEATHERMAP_URL, - TEMP_UNIT, - TEMP_LANG, - WEATHER_UPDATE_INTERVAL, - NTP_SERVER, - GMT_OFFSET_SEC + .cityID = CITY_ID, + .weatherAPIKey = OPENWEATHERMAP_APIKEY, + .weatherURL = OPENWEATHERMAP_URL, + .weatherUnit = TEMP_UNIT, + .weatherLang = TEMP_LANG, + .weatherUpdateInterval = WEATHER_UPDATE_INTERVAL, + .ntpServer = NTP_SERVER, + .gmtOffset = GMT_OFFSET_SEC, }; #endif \ No newline at end of file diff --git a/examples/WatchFaces/Tetris/settings.h b/examples/WatchFaces/Tetris/settings.h index 654a219..53d47e3 100644 --- a/examples/WatchFaces/Tetris/settings.h +++ b/examples/WatchFaces/Tetris/settings.h @@ -13,14 +13,14 @@ #define GMT_OFFSET_SEC 3600 * -5 //New York is UTC -5 EST, -4 EDT watchySettings settings{ - CITY_ID, - OPENWEATHERMAP_APIKEY, - OPENWEATHERMAP_URL, - TEMP_UNIT, - TEMP_LANG, - WEATHER_UPDATE_INTERVAL, - NTP_SERVER, - GMT_OFFSET_SEC + .cityID = CITY_ID, + .weatherAPIKey = OPENWEATHERMAP_APIKEY, + .weatherURL = OPENWEATHERMAP_URL, + .weatherUnit = TEMP_UNIT, + .weatherLang = TEMP_LANG, + .weatherUpdateInterval = WEATHER_UPDATE_INTERVAL, + .ntpServer = NTP_SERVER, + .gmtOffset = GMT_OFFSET_SEC, }; #endif \ No newline at end of file diff --git a/src/Watchy.cpp b/src/Watchy.cpp index b95a036..a005180 100644 --- a/src/Watchy.cpp +++ b/src/Watchy.cpp @@ -30,6 +30,12 @@ void Watchy::init(String datetime) { if (guiState == WATCHFACE_STATE) { RTC.read(currentTime); showWatchFace(true); // partial updates on tick + if (settings.vibrateOClock) { + if (currentTime.Minute == 0) { + // The RTC wakes us up once per minute + vibMotor(75, 4); + } + } } break; case ESP_SLEEP_WAKEUP_EXT1: // button Press @@ -40,6 +46,7 @@ void Watchy::init(String datetime) { _bmaConfig(); RTC.read(currentTime); showWatchFace(false); // full update on reset + vibMotor(75, 4); break; } deepSleep(); diff --git a/src/Watchy.h b/src/Watchy.h index af6ae29..74140c9 100644 --- a/src/Watchy.h +++ b/src/Watchy.h @@ -35,6 +35,8 @@ typedef struct watchySettings { String ntpServer; int gmtOffset; int dstOffset; + // + bool vibrateOClock; } watchySettings; class Watchy {