From bf7425c7dc56de86c081583642a450e2a8d9b46b Mon Sep 17 00:00:00 2001 From: Lyndon Nerenberg Date: Wed, 5 Jan 2022 00:25:22 -0800 Subject: [PATCH] Add an "About Watchy" menu item. This replaces "Check Battery" and adds the following info: * Firmware version * RTC chip type The firmware version is #defined in Watchy.h. There might be a way to do this that's friendlier to the library release process, but I'll leave that up to the people who actually build the releases. I plan to extend the About menu with some radio-related info as I work on getting BLE pairing working with my iPhone. --- src/Watchy.cpp | 29 +++++++++++++++++++++-------- src/Watchy.h | 6 ++++-- src/WatchyRTC.cpp | 2 +- 3 files changed, 26 insertions(+), 11 deletions(-) diff --git a/src/Watchy.cpp b/src/Watchy.cpp index 75d3885..6aa38f0 100644 --- a/src/Watchy.cpp +++ b/src/Watchy.cpp @@ -72,7 +72,7 @@ void Watchy::handleButtonPress(){ switch(menuIndex) { case 0: - showBattery(); + showAbout(); break; case 1: showBuzz(); @@ -154,7 +154,7 @@ void Watchy::handleButtonPress(){ switch(menuIndex) { case 0: - showBattery(); + showAbout(); break; case 1: showBuzz(); @@ -223,7 +223,7 @@ void Watchy::showMenu(byte menuIndex, bool partialRefresh){ uint16_t w, h; int16_t yPos; - const char *menuItems[] = {"Check Battery", "Vibrate Motor", "Show Accelerometer", "Set Time", "Setup WiFi", "Update Firmware", "Sync NTP"}; + const char *menuItems[] = {"About Watchy", "Vibrate Motor", "Show Accelerometer", "Set Time", "Setup WiFi", "Update Firmware", "Sync NTP"}; for(int i=0; iindex ? data.substring(strIndex[0], strIndex[1]) : ""; -} \ No newline at end of file +}