From 1674ae47f02936dee93328c2b73deca4c737fb3e Mon Sep 17 00:00:00 2001 From: CommanderRedYT Date: Fri, 15 Oct 2021 20:23:00 +0200 Subject: [PATCH 01/11] Improved performance and usablity --- main/displays/menus/mainmenu.h | 40 ++++++++++++------ main/displays/menus/settingsmenu.h | 3 ++ main/displays/statusdisplay.h | 16 +++++-- main/globals.h | 6 ++- main/ledstrip.h | 68 +++++++++++++----------------- main/presets.h | 8 ++-- main/settingsutils.h | 3 ++ main/texts.h | 4 ++ 8 files changed, 89 insertions(+), 59 deletions(-) diff --git a/main/displays/menus/mainmenu.h b/main/displays/menus/mainmenu.h index ff8527b..f46fde9 100644 --- a/main/displays/menus/mainmenu.h +++ b/main/displays/menus/mainmenu.h @@ -27,6 +27,9 @@ #endif #include "icons/poweroff.h" #include "icons/reboot.h" +#ifdef MAINMENU_PLUGIN +#include MAINMENU_PLUGIN +#endif // forward declares namespace { @@ -47,6 +50,14 @@ class UpdateDisplay; class PoweroffDisplay; class DebugMenu; class BatteryMenu; +#ifdef MAINMENU_PLUGIN + GMEN2 +#endif +#if !defined(MAINMENU_PLUGIN) and !defined(GMEN3) +#define SHOWITEM !simplified +#else +#define SHOWITEM GMEN3 +#endif } // namespace using namespace espgui; @@ -65,32 +76,35 @@ public: #ifdef FEATURE_LEDSTRIP constructMenuItem, SwitchScreenAction, StaticMenuItemIcon<&bobbyicons::neopixel>>>(); #endif - if (!simplified) { constructMenuItem, ModeSettingsAction>>(); } - if (!simplified) { constructMenuItem, SwitchScreenAction, StaticMenuItemIcon<&bobbyicons::presets>>>(); } - if (!simplified) { constructMenuItem, SwitchScreenAction>>(); } - if (!simplified) { constructMenuItem, SwitchScreenAction, StaticMenuItemIcon<&bobbyicons::graph>>>(); } - if (!simplified) { constructMenuItem, SwitchScreenAction, StaticMenuItemIcon<&bobbyicons::battery>>>(); } + if (SHOWITEM) { constructMenuItem, ModeSettingsAction>>(); } + if (SHOWITEM) { constructMenuItem, SwitchScreenAction, StaticMenuItemIcon<&bobbyicons::presets>>>(); } + if (SHOWITEM) { constructMenuItem, SwitchScreenAction>>(); } + if (SHOWITEM) { constructMenuItem, SwitchScreenAction, StaticMenuItemIcon<&bobbyicons::graph>>>(); } + if (SHOWITEM) { constructMenuItem, SwitchScreenAction, StaticMenuItemIcon<&bobbyicons::battery>>>(); } #if defined(FEATURE_CAN) && defined(FEATURE_POWERSUPPLY) - if (!simplified) { constructMenuItem, SwitchScreenAction>>(); } + if (SHOWITEM) { constructMenuItem, SwitchScreenAction>>(); } #endif #if defined(FEATURE_BLUETOOTH) && defined(FEATURE_BMS) - if (!simplified) { constructMenuItem, SwitchScreenAction, StaticMenuItemIcon<&bobbyicons::bms>>>(); } + if (SHOWITEM) { constructMenuItem, SwitchScreenAction, StaticMenuItemIcon<&bobbyicons::bms>>>(); } #endif - if (!simplified) { constructMenuItem, SwitchScreenAction, StaticMenuItemIcon<&bobbyicons::settings>>>(); } - constructMenuItem, SwitchScreenAction, StaticMenuItemIcon<&bobbyicons::lock>>>(); + if (SHOWITEM) { constructMenuItem, SwitchScreenAction, StaticMenuItemIcon<&bobbyicons::settings>>>(); } #ifdef FEATURE_MOSFETS - if (!simplified) { constructMenuItem, SwitchScreenAction>>(); } + if (SHOWITEM) { constructMenuItem, SwitchScreenAction>>(); } #endif constructMenuItem, SwitchScreenAction, StaticMenuItemIcon<&bobbyicons::demos>>>(); + constructMenuItem, SwitchScreenAction, StaticMenuItemIcon<&bobbyicons::lock>>>(); #ifdef FEATURE_GARAGE - if (!simplified) { constructMenuItem, SwitchScreenAction>>(); } + if (SHOWITEM) { constructMenuItem, SwitchScreenAction>>(); } #endif #ifdef FEATURE_OTA - if (!simplified) { constructMenuItem, SwitchScreenAction, StaticMenuItemIcon<&bobbyicons::update>>>(); } + if (SHOWITEM) { constructMenuItem, SwitchScreenAction, StaticMenuItemIcon<&bobbyicons::update>>>(); } #endif constructMenuItem, SwitchScreenAction, StaticMenuItemIcon<&bobbyicons::poweroff>>>(); constructMenuItem, RebootAction, StaticMenuItemIcon<&bobbyicons::reboot>>>(); - if (!simplified) { constructMenuItem, SwitchScreenAction>>(); } + if (SHOWITEM) { constructMenuItem, SwitchScreenAction>>(); } +#ifdef MAINMENU_PLUGIN + GMEN1 +#endif } }; } // namespace diff --git a/main/displays/menus/settingsmenu.h b/main/displays/menus/settingsmenu.h index 54253df..ee00557 100644 --- a/main/displays/menus/settingsmenu.h +++ b/main/displays/menus/settingsmenu.h @@ -59,7 +59,10 @@ public: #ifdef FEATURE_LEDBACKLIGHT constructMenuItem, ToggleBoolAction, CheckboxIcon, BacklightAccessor>>(); #endif + if (!simplified) + { constructMenuItem, SwitchScreenAction>>(); + } constructMenuItem, SwitchScreenAction, StaticMenuItemIcon<&bobbyicons::wifi>>>(); #ifdef FEATURE_BLUETOOTH constructMenuItem, SwitchScreenAction, StaticMenuItemIcon<&bobbyicons::bluetooth>>>(); diff --git a/main/displays/statusdisplay.h b/main/displays/statusdisplay.h index 98bdc74..3560ed5 100644 --- a/main/displays/statusdisplay.h +++ b/main/displays/statusdisplay.h @@ -23,6 +23,8 @@ namespace { class MainMenu; class BmsDisplay; class MetersDisplay; + +static uint16_t counter = 24; } namespace { @@ -158,6 +160,7 @@ void StatusDisplay::initScreen() m_labelProfile.start(); tft.setTextColor(TFT_WHITE, TFT_BLACK); + counter = 0; } void StatusDisplay::redraw() @@ -170,9 +173,15 @@ void StatusDisplay::redraw() m_labelBrems.redraw(brems ? fmt::format("{:.2f}", *brems) : "?"); m_progressBarBrems.redraw(brems ? *brems : 0); - m_batterypercent.redraw(getBatteryPercentageString()); - m_watthoursleft.redraw(getBatteryRemainingWattHoursString()); - m_kilometersleft.redraw(getRemainingRangeString()); + if (counter < 1) + { + counter = 25; + m_batterypercent.redraw(getBatteryPercentageString()); + m_watthoursleft.redraw(getBatteryRemainingWattHoursString()); + m_kilometersleft.redraw(getRemainingRangeString()); + } + else + counter--; m_frontStatus.redraw(controllers.front); m_backStatus.redraw(controllers.back); @@ -241,6 +250,7 @@ clearIp: void StatusDisplay::rotate(int offset) { + counter = 0; if (offset < 0) #ifdef FEATURE_BMS switchScreen(); diff --git a/main/globals.h b/main/globals.h index 457d6fb..5909e73 100644 --- a/main/globals.h +++ b/main/globals.h @@ -41,7 +41,11 @@ float avgSpeed, avgSpeedKmh, sumCurrent; char deviceName[32] = STRING(DEVICE_PREFIX) "_ERR"; -#if defined(SIMPLIFIED_TRIGGER_TRIGGERONPRESET) +#ifdef GLOBALS_PLUGIN +#include GLOBALS_PLUGIN +#endif + +#if defined(HAS_SIMPLIFIED) bool simplified = true; #else bool simplified = false; diff --git a/main/ledstrip.h b/main/ledstrip.h index cdaa50c..1b4fc44 100644 --- a/main/ledstrip.h +++ b/main/ledstrip.h @@ -149,19 +149,21 @@ void updateLedStrip() } void showAnimation() { - if (animation_type == LEDSTRIP_ANIMATION_TYPE_DEFAULTRAINBOW) showDefaultLedstrip(); - else if (animation_type == LEDSTRIP_ANIMATION_TYPE_BETTERRAINBOW) showBetterRainbow(); - else if (animation_type == LEDSTRIP_ANIMATION_TYPE_SPEEDSYNCANIMATION) showSpeedSyncAnimation(); - else showDefaultLedstrip(); + if (settings.ledstrip.enableLedAnimation && !simplified) + { + if (animation_type == LEDSTRIP_ANIMATION_TYPE_DEFAULTRAINBOW) showDefaultLedstrip(); + else if (animation_type == LEDSTRIP_ANIMATION_TYPE_BETTERRAINBOW) showBetterRainbow(); + else if (animation_type == LEDSTRIP_ANIMATION_TYPE_SPEEDSYNCANIMATION) showSpeedSyncAnimation(); + else showDefaultLedstrip(); + } + else + { + std::fill(std::begin(leds), std::end(leds), CRGB{0, 0, 0}); + } } void showBetterRainbow() { - if (settings.ledstrip.enableLedAnimation) - { - fill_rainbow(&*std::begin(leds), leds.size(), gHue); - } - else - std::fill(std::begin(leds), std::end(leds), CRGB{0, 0, 0}); + fill_rainbow(&*std::begin(leds), leds.size(), gHue); } void fill_rainbow_invert_at( struct CRGB * pFirstLED, int numToFill, int invertAtLed, @@ -185,49 +187,39 @@ void fill_rainbow_invert_at( struct CRGB * pFirstLED, int numToFill, int invertA } void showSpeedSyncAnimation() { - if (settings.ledstrip.enableLedAnimation) - { #ifdef LEDS_PER_METER - const float leds_per_meter = LEDS_PER_METER; + const float leds_per_meter = LEDS_PER_METER; #else - const float leds_per_meter = 144; + const float leds_per_meter = 144; #endif - static auto last_interval = espchrono::millis_clock::now(); - auto difference_ms = espchrono::ago(last_interval).count(); + static auto last_interval = espchrono::millis_clock::now(); + auto difference_ms = espchrono::ago(last_interval).count(); - static float hue_result = 0; + static float hue_result = 0; - const float hue_per_led = 1. / std::max(uint8_t(1), uint8_t(settings.ledstrip.animationMultiplier)); - const float meter_per_second = avgSpeedKmh / 3.6; - const float leds_per_second = meter_per_second * leds_per_meter; - const float hue_per_second = leds_per_second * hue_per_led; + const float hue_per_led = 1. / std::max(uint8_t(1), uint8_t(settings.ledstrip.animationMultiplier)); + const float meter_per_second = avgSpeedKmh / 3.6; + const float leds_per_second = meter_per_second * leds_per_meter; + const float hue_per_second = leds_per_second * hue_per_led; - hue_result += hue_per_second * difference_ms / 1000.f; + hue_result += hue_per_second * difference_ms / 1000.f; - fill_rainbow_invert_at(&*std::begin(leds), leds.size(),leds.size()/2, hue_result,-hue_per_led); + fill_rainbow_invert_at(&*std::begin(leds), leds.size(),leds.size()/2, hue_result,-hue_per_led); - last_interval = espchrono::millis_clock::now(); - } - else - std::fill(std::begin(leds), std::end(leds), CRGB{0, 0, 0}); + last_interval = espchrono::millis_clock::now(); } void showDefaultLedstrip() { - if (settings.ledstrip.enableLedAnimation) - { - fadeToBlackBy(&*std::begin(leds), leds.size(), 20); + fadeToBlackBy(&*std::begin(leds), leds.size(), 20); - uint8_t dothue = 0; - for (int i = 0; i < 8; i++) - { - leds[beatsin16(i + 7, 0, leds.size())] |= CHSV(dothue, 200, 255); - dothue += 32; - } + uint8_t dothue = 0; + for (int i = 0; i < 8; i++) + { + leds[beatsin16(i + 7, 0, leds.size())] |= CHSV(dothue, 200, 255); + dothue += 32; } - else - std::fill(std::begin(leds), std::end(leds), CRGB{0, 0, 0}); } } // namespace #endif diff --git a/main/presets.h b/main/presets.h index eea3b68..fecfd56 100644 --- a/main/presets.h +++ b/main/presets.h @@ -258,10 +258,10 @@ constexpr Settings::Battery defaultBattery { .cellsParallel = 4, .cellType = 0, .watthoursPerKilometer = 20, - .front30VoltCalibration = 30, - .back30VoltCalibration = 30, - .front50VoltCalibration = 50, - .back50VoltCalibration = 50, + .front30VoltCalibration = 3000, + .back30VoltCalibration = 3000, + .front50VoltCalibration = 5000, + .back50VoltCalibration = 5000, .applyCalibration = true }; diff --git a/main/settingsutils.h b/main/settingsutils.h index 96bcb5e..8fd4df6 100644 --- a/main/settingsutils.h +++ b/main/settingsutils.h @@ -17,6 +17,9 @@ void switchProfile(uint8_t index) if (index == SIMPLIFIED_TRIGGER_TRIGGERONPRESET) { simplified = true; +#ifdef SETTINGSUTILS_PLUGIN +#include SETTINGSUTILS_PLUGIN +#endif return; } #endif diff --git a/main/texts.h b/main/texts.h index a452db2..ce4d9f8 100644 --- a/main/texts.h +++ b/main/texts.h @@ -9,6 +9,10 @@ constexpr char TEXT_BACK[] = "Back"; constexpr char TEXT_ACCESSPOINTWIFISETTINGS[] = "Access Point WiFi settings"; //constexpr char TEXT_BACK[] = "Back"; +#ifdef TEXTS_PLUGIN +#include TEXTS_PLUGIN +#endif + #ifdef FEATURE_BLUETOOTH //BluetoothSettingsMenu constexpr char TEXT_BLUETOOTHSETTINGS[] = "Bluetooth settings"; From 876fc5d173778cf036339b46586effb62ed8401d Mon Sep 17 00:00:00 2001 From: CommanderRedYT Date: Sat, 16 Oct 2021 20:29:19 +0200 Subject: [PATCH 02/11] Added coredump --- sdkconfig_comred | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/sdkconfig_comred b/sdkconfig_comred index 4df478d..c496d51 100644 --- a/sdkconfig_comred +++ b/sdkconfig_comred @@ -681,9 +681,16 @@ CONFIG_ESP32_PHY_MAX_TX_POWER=20 # # Core dump # -# CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH is not set +CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH=y # CONFIG_ESP_COREDUMP_ENABLE_TO_UART is not set -CONFIG_ESP_COREDUMP_ENABLE_TO_NONE=y +# CONFIG_ESP_COREDUMP_ENABLE_TO_NONE is not set +# CONFIG_ESP_COREDUMP_DATA_FORMAT_BIN is not set +CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF=y +# CONFIG_ESP_COREDUMP_CHECKSUM_CRC32 is not set +CONFIG_ESP_COREDUMP_CHECKSUM_SHA256=y +CONFIG_ESP_COREDUMP_ENABLE=y +CONFIG_ESP_COREDUMP_MAX_TASKS_NUM=64 +CONFIG_ESP_COREDUMP_STACK_SIZE=0 # end of Core dump # @@ -769,7 +776,7 @@ CONFIG_FREERTOS_ASSERT_FAIL_ABORT=y # CONFIG_FREERTOS_ASSERT_FAIL_PRINT_CONTINUE is not set # CONFIG_FREERTOS_ASSERT_DISABLE is not set CONFIG_FREERTOS_IDLE_TASK_STACKSIZE=2304 -CONFIG_FREERTOS_ISR_STACKSIZE=1536 +CONFIG_FREERTOS_ISR_STACKSIZE=2096 # CONFIG_FREERTOS_LEGACY_HOOKS is not set CONFIG_FREERTOS_MAX_TASK_NAME_LEN=16 CONFIG_FREERTOS_SUPPORT_STATIC_ALLOCATION=y @@ -1442,9 +1449,16 @@ CONFIG_ESP32S2_PANIC_PRINT_REBOOT=y # CONFIG_ESP32S2_PANIC_GDBSTUB is not set CONFIG_TIMER_TASK_STACK_SIZE=3584 CONFIG_SW_COEXIST_ENABLE=y -# CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH is not set +CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH=y # CONFIG_ESP32_ENABLE_COREDUMP_TO_UART is not set -CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE=y +# CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE is not set +# CONFIG_ESP32_COREDUMP_DATA_FORMAT_BIN is not set +CONFIG_ESP32_COREDUMP_DATA_FORMAT_ELF=y +# CONFIG_ESP32_COREDUMP_CHECKSUM_CRC32 is not set +CONFIG_ESP32_COREDUMP_CHECKSUM_SHA256=y +CONFIG_ESP32_ENABLE_COREDUMP=y +CONFIG_ESP32_CORE_DUMP_MAX_TASKS_NUM=64 +CONFIG_ESP32_CORE_DUMP_STACK_SIZE=0 CONFIG_MB_MASTER_TIMEOUT_MS_RESPOND=150 CONFIG_MB_MASTER_DELAY_MS_CONVERT=200 CONFIG_MB_QUEUE_LENGTH=20 From 734486c822551d7e0fb6fde17206adfa03fda1d1 Mon Sep 17 00:00:00 2001 From: CommanderRedYT Date: Sat, 16 Oct 2021 20:39:23 +0200 Subject: [PATCH 03/11] Added coredump for peter --- sdkconfig_peter | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/sdkconfig_peter b/sdkconfig_peter index 4df478d..c496d51 100644 --- a/sdkconfig_peter +++ b/sdkconfig_peter @@ -681,9 +681,16 @@ CONFIG_ESP32_PHY_MAX_TX_POWER=20 # # Core dump # -# CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH is not set +CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH=y # CONFIG_ESP_COREDUMP_ENABLE_TO_UART is not set -CONFIG_ESP_COREDUMP_ENABLE_TO_NONE=y +# CONFIG_ESP_COREDUMP_ENABLE_TO_NONE is not set +# CONFIG_ESP_COREDUMP_DATA_FORMAT_BIN is not set +CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF=y +# CONFIG_ESP_COREDUMP_CHECKSUM_CRC32 is not set +CONFIG_ESP_COREDUMP_CHECKSUM_SHA256=y +CONFIG_ESP_COREDUMP_ENABLE=y +CONFIG_ESP_COREDUMP_MAX_TASKS_NUM=64 +CONFIG_ESP_COREDUMP_STACK_SIZE=0 # end of Core dump # @@ -769,7 +776,7 @@ CONFIG_FREERTOS_ASSERT_FAIL_ABORT=y # CONFIG_FREERTOS_ASSERT_FAIL_PRINT_CONTINUE is not set # CONFIG_FREERTOS_ASSERT_DISABLE is not set CONFIG_FREERTOS_IDLE_TASK_STACKSIZE=2304 -CONFIG_FREERTOS_ISR_STACKSIZE=1536 +CONFIG_FREERTOS_ISR_STACKSIZE=2096 # CONFIG_FREERTOS_LEGACY_HOOKS is not set CONFIG_FREERTOS_MAX_TASK_NAME_LEN=16 CONFIG_FREERTOS_SUPPORT_STATIC_ALLOCATION=y @@ -1442,9 +1449,16 @@ CONFIG_ESP32S2_PANIC_PRINT_REBOOT=y # CONFIG_ESP32S2_PANIC_GDBSTUB is not set CONFIG_TIMER_TASK_STACK_SIZE=3584 CONFIG_SW_COEXIST_ENABLE=y -# CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH is not set +CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH=y # CONFIG_ESP32_ENABLE_COREDUMP_TO_UART is not set -CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE=y +# CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE is not set +# CONFIG_ESP32_COREDUMP_DATA_FORMAT_BIN is not set +CONFIG_ESP32_COREDUMP_DATA_FORMAT_ELF=y +# CONFIG_ESP32_COREDUMP_CHECKSUM_CRC32 is not set +CONFIG_ESP32_COREDUMP_CHECKSUM_SHA256=y +CONFIG_ESP32_ENABLE_COREDUMP=y +CONFIG_ESP32_CORE_DUMP_MAX_TASKS_NUM=64 +CONFIG_ESP32_CORE_DUMP_STACK_SIZE=0 CONFIG_MB_MASTER_TIMEOUT_MS_RESPOND=150 CONFIG_MB_MASTER_DELAY_MS_CONVERT=200 CONFIG_MB_QUEUE_LENGTH=20 From f5bdae6841355e2b9a6ba9c83c3648166ace3e7b Mon Sep 17 00:00:00 2001 From: CommanderRedYT Date: Sun, 17 Oct 2021 11:27:45 +0200 Subject: [PATCH 04/11] It finally crashes! --- main/CMakeLists.txt | 2 ++ main/displays/menus/crashmenu.cpp | 0 main/displays/menus/crashmenu.h | 39 ++++++++++++++++++++++++++++++ main/displays/menus/settingsmenu.h | 3 +++ main/main.cpp | 1 + main/settingsutils.h | 6 ++--- main/texts.h | 5 ++++ 7 files changed, 53 insertions(+), 3 deletions(-) create mode 100644 main/displays/menus/crashmenu.cpp create mode 100644 main/displays/menus/crashmenu.h diff --git a/main/CMakeLists.txt b/main/CMakeLists.txt index c139075..27ff81e 100644 --- a/main/CMakeLists.txt +++ b/main/CMakeLists.txt @@ -102,6 +102,7 @@ set(headers displays/menus/cloudsettingsmenu.h displays/menus/commanddebugmenu.h displays/menus/controllerhardwaresettingsmenu.h + displays/menus/crashmenu.h displays/menus/debugmenu.h displays/menus/defaultmodesettingsmenu.h displays/menus/demosmenu.h @@ -278,6 +279,7 @@ set(sources displays/menus/cloudsettingsmenu.cpp displays/menus/commanddebugmenu.cpp displays/menus/controllerhardwaresettingsmenu.cpp + displays/menus/crashmenu.cpp displays/menus/debugmenu.cpp displays/menus/defaultmodesettingsmenu.cpp displays/menus/demosmenu.cpp diff --git a/main/displays/menus/crashmenu.cpp b/main/displays/menus/crashmenu.cpp new file mode 100644 index 0000000..e69de29 diff --git a/main/displays/menus/crashmenu.h b/main/displays/menus/crashmenu.h new file mode 100644 index 0000000..474f1d7 --- /dev/null +++ b/main/displays/menus/crashmenu.h @@ -0,0 +1,39 @@ +#pragma once + +// local includes +#include "menudisplay.h" +#include "utils.h" +#include "actions/dummyaction.h" +#include "icons/back.h" +#include "texts.h" +#include + + +// forward declares +namespace { +class SettingsMenu; + +class AssertAction : public virtual ActionInterface { public: void triggered() override { assert(0); } }; +class DivideByZeroAction : public virtual ActionInterface { public: void triggered() override { int goodbye = 42 / 0; ESP_LOGW("divByZero", "%i", goodbye); } }; + + +} // namespace + +using namespace espgui; + +namespace { + +class CrashMenu : + public MenuDisplay, + public StaticText, + public BackActionInterface> +{ +public: + CrashMenu() + { + constructMenuItem, AssertAction>>(); + constructMenuItem, DivideByZeroAction>>(); + constructMenuItem, SwitchScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>(); + } +}; +} // namespace diff --git a/main/displays/menus/settingsmenu.h b/main/displays/menus/settingsmenu.h index ee00557..9ae9248 100644 --- a/main/displays/menus/settingsmenu.h +++ b/main/displays/menus/settingsmenu.h @@ -14,6 +14,7 @@ #include "icons/hardware.h" #include "icons/buzzer.h" #include "icons/info.h" +#include "icons/demos.h" #include "icons/back.h" #include "texts.h" #include "globals.h" @@ -33,6 +34,7 @@ class BoardcomputerHardwareSettingsMenu; class BuzzerMenu; class AboutMenu; class MainMenu; +class CrashMenu; } using namespace espgui; @@ -83,6 +85,7 @@ public: constructMenuItem, SwitchScreenAction, StaticMenuItemIcon<&bobbyicons::buzzer>>>(); constructMenuItem, ToggleBoolAction, CheckboxIcon, FrontLedAccessor>>(); constructMenuItem, ToggleBoolAction, CheckboxIcon, BackLedAccessor>>(); + constructMenuItem, SwitchScreenAction, StaticMenuItemIcon<&bobbyicons::demos>>>(); constructMenuItem, SwitchScreenAction, StaticMenuItemIcon<&bobbyicons::info>>>(); constructMenuItem, SwitchScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>(); } diff --git a/main/main.cpp b/main/main.cpp index 534b9f3..a1a0932 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -38,6 +38,7 @@ using namespace std::chrono_literals; #endif #include "displays/menus/buzzermenu.h" #include "displays/menus/commanddebugmenu.h" +#include "displays/menus/crashmenu.h" #include "displays/menus/debugmenu.h" #include "displays/menus/defaultmodesettingsmenu.h" #include "displays/menus/demosmenu.h" diff --git a/main/settingsutils.h b/main/settingsutils.h index 8fd4df6..a72191e 100644 --- a/main/settingsutils.h +++ b/main/settingsutils.h @@ -10,9 +10,6 @@ namespace { void switchProfile(uint8_t index) { - settings = presets::defaultSettings; - stringSettings = presets::makeDefaultStringSettings(); - #ifdef SIMPLIFIED_TRIGGER_TRIGGERONPRESET if (index == SIMPLIFIED_TRIGGER_TRIGGERONPRESET) { @@ -24,6 +21,9 @@ void switchProfile(uint8_t index) } #endif + settings = presets::defaultSettings; + stringSettings = presets::makeDefaultStringSettings(); + if (!settingsPersister.openProfile(index)) { ESP_LOGE("BOBBY", "openProfile() failed"); diff --git a/main/texts.h b/main/texts.h index ce4d9f8..fa4961f 100644 --- a/main/texts.h +++ b/main/texts.h @@ -466,6 +466,11 @@ constexpr char TEXT_WIFI_POWER_2dBm[] = "2dBm"; constexpr char TEXT_WIFI_POWER_MINUS_1dBm[] = "-1dBm"; //constexpr char TEXT_BACK[] = "Back"; +//Crashmenu +constexpr char TEXT_CRASHMENU[] = "Crash Menu"; +constexpr char TEXT_CRASH_ASSERT[] = "assert(0)"; +constexpr char TEXT_CRASH_DIVZERO[] = "42 / 0"; + #ifdef FEATURE_CAN constexpr char TEXT_POWERSUPPLY[] = "Powersupply"; #endif From dcdf27118cb72fcd10aaa656230284c2a250a7d7 Mon Sep 17 00:00:00 2001 From: CommanderRedYT Date: Sun, 17 Oct 2021 11:28:04 +0200 Subject: [PATCH 05/11] Coredump --- coredump.sh | 2 ++ 1 file changed, 2 insertions(+) create mode 100755 coredump.sh diff --git a/coredump.sh b/coredump.sh new file mode 100755 index 0000000..581cdf1 --- /dev/null +++ b/coredump.sh @@ -0,0 +1,2 @@ +#!/bin/bash +espcoredump.py -p /dev/ttyUSB0 dbg_corefile ./build/bobbyquad_*.elf From b07d599dc25562451e60af1120773a33ce10fa37 Mon Sep 17 00:00:00 2001 From: CommanderRedYT Date: Mon, 18 Oct 2021 12:46:13 +0200 Subject: [PATCH 06/11] Preparations for build server select --- config_comred.cmake | 1 + config_feedc0de.cmake | 1 + config_greyhash.cmake | 1 + config_mick.cmake | 1 + config_peter.cmake | 1 + 5 files changed, 5 insertions(+) diff --git a/config_comred.cmake b/config_comred.cmake index 3c9a2f7..e21a2f1 100644 --- a/config_comred.cmake +++ b/config_comred.cmake @@ -44,6 +44,7 @@ set(BOBBYCAR_BUILDFLAGS -DAP_PASSWORD=Passwort_123 -DFEATURE_WEBSERVER -DFEATURE_OTA + -DOTA_USERNAME="comred" # -DFEATURE_DPAD_5WIRESW # -DPINS_DPAD_5WIRESW_OUT=4 # -DPINS_DPAD_5WIRESW_IN1=5 diff --git a/config_feedc0de.cmake b/config_feedc0de.cmake index f38ecdc..03d7bcf 100644 --- a/config_feedc0de.cmake +++ b/config_feedc0de.cmake @@ -44,6 +44,7 @@ set(BOBBYCAR_BUILDFLAGS -DAP_PASSWORD=Passwort_123 -DFEATURE_WEBSERVER -DFEATURE_OTA + -DOTA_USERNAME="feedc0de" -DFEATURE_DPAD_5WIRESW -DPINS_DPAD_5WIRESW_OUT=18 -DPINS_DPAD_5WIRESW_IN1=19 diff --git a/config_greyhash.cmake b/config_greyhash.cmake index ce9bd42..d4705dd 100644 --- a/config_greyhash.cmake +++ b/config_greyhash.cmake @@ -44,6 +44,7 @@ set(BOBBYCAR_BUILDFLAGS -DAP_PASSWORD=Passwort_123 -DFEATURE_WEBSERVER -DFEATURE_OTA + -DOTA_USERNAME="greyhash" -DFEATURE_DPAD_5WIRESW -DPINS_DPAD_5WIRESW_OUT=4 -DPINS_DPAD_5WIRESW_IN1=5 diff --git a/config_mick.cmake b/config_mick.cmake index da9cfa2..c9902c3 100644 --- a/config_mick.cmake +++ b/config_mick.cmake @@ -44,6 +44,7 @@ set(BOBBYCAR_BUILDFLAGS -DAP_PASSWORD=Passwort_123 -DFEATURE_WEBSERVER # -DFEATURE_OTA +# -DOTA_USERNAME="mick" # -DFEATURE_DPAD_5WIRESW # -DPINS_DPAD_5WIRESW_OUT=4 # -DPINS_DPAD_5WIRESW_IN1=5 diff --git a/config_peter.cmake b/config_peter.cmake index 257e7c7..003bc61 100644 --- a/config_peter.cmake +++ b/config_peter.cmake @@ -44,6 +44,7 @@ set(BOBBYCAR_BUILDFLAGS -DAP_PASSWORD=Passwort_123 -DFEATURE_WEBSERVER -DFEATURE_OTA + -DOTA_USERNAME="peter" -DFEATURE_DPAD_5WIRESW_2OUT -DPINS_DPAD_5WIRESW_OUT1=18 -DPINS_DPAD_5WIRESW_OUT2=19 From 595d0434cfc0591d7e6a684f8ca9ad973ed768a3 Mon Sep 17 00:00:00 2001 From: CommanderRedYT Date: Mon, 18 Oct 2021 12:47:22 +0200 Subject: [PATCH 07/11] Replaced with template --- main/actions/ledstripanimationactions.h | 11 ++++++++++- main/displays/menus/ledstripselectanimationmenu.h | 6 +++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/main/actions/ledstripanimationactions.h b/main/actions/ledstripanimationactions.h index d125d06..2d58f69 100644 --- a/main/actions/ledstripanimationactions.h +++ b/main/actions/ledstripanimationactions.h @@ -4,11 +4,19 @@ #include "utils.h" #include "globals.h" #include "ledstrip.h" -#include "ledstripdefines.h" +// #include "ledstripdefines.h" using namespace espgui; namespace { +template +class LedStripSetAnimationAction : public virtual ActionInterface +{ +public: + void triggered() override { animation_type = type; } +}; + +/* class LedstripAnimationDefaultRainbowAction : public virtual ActionInterface { public: @@ -26,4 +34,5 @@ class LedstripAnimationSyncToSpeedAction : public virtual ActionInterface public: void triggered() override { animation_type = LEDSTRIP_ANIMATION_TYPE_SPEEDSYNCANIMATION; } }; +*/ } diff --git a/main/displays/menus/ledstripselectanimationmenu.h b/main/displays/menus/ledstripselectanimationmenu.h index 6d07fb7..783f972 100644 --- a/main/displays/menus/ledstripselectanimationmenu.h +++ b/main/displays/menus/ledstripselectanimationmenu.h @@ -45,9 +45,9 @@ namespace { { constructMenuItem>(); constructMenuItem>(); - constructMenuItem, LedstripAnimationDefaultRainbowAction>>(); - constructMenuItem, LedstripAnimationBetterRainbowAction>>(); - constructMenuItem, LedstripAnimationSyncToSpeedAction>>(); + constructMenuItem, LedStripSetAnimationAction>>(); + constructMenuItem, LedStripSetAnimationAction>>(); + constructMenuItem, LedStripSetAnimationAction>>(); constructMenuItem, SwitchScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>(); } }; From 5c657c20afe5771dd8441b3b4c451f62845eeff0 Mon Sep 17 00:00:00 2001 From: CommanderRedYT Date: Mon, 18 Oct 2021 12:59:38 +0200 Subject: [PATCH 08/11] CAUSING A STACKOVERFLOW --- main/CMakeLists.txt | 3 ++ main/actions/selectbuildserveraction.h | 4 ++ main/buildserver.h | 0 main/displays/menus/selectbuildservermenu.h | 45 +++++++++++++++++++++ main/displays/menus/settingsmenu.h | 5 +++ main/globals.h | 2 +- main/main.cpp | 1 + main/presets.h | 15 +++++++ main/stringsettings.h | 31 ++++++++++++++ main/texts.h | 3 ++ 10 files changed, 108 insertions(+), 1 deletion(-) create mode 100644 main/actions/selectbuildserveraction.h create mode 100644 main/buildserver.h create mode 100644 main/displays/menus/selectbuildservermenu.h diff --git a/main/CMakeLists.txt b/main/CMakeLists.txt index 27ff81e..6241553 100644 --- a/main/CMakeLists.txt +++ b/main/CMakeLists.txt @@ -5,6 +5,7 @@ set(headers bluetoothmode.h bluetoothtexthelpers.h bmsutils.h + buildserver.h buttons.h can.h changevaluedisplay_bluetoothmode.h @@ -76,6 +77,7 @@ set(headers actions/multiaction.h actions/rebootaction.h actions/savesettingsaction.h + actions/selectbuildserveraction.h actions/switchprofileaction.h actions/tempomatmodeapplycurrentpeedaction.h actions/updateswapfrontbackaction.h @@ -127,6 +129,7 @@ set(headers displays/menus/presetsmenu.h displays/menus/profilesmenu.h displays/menus/selectbatterytypemenu.h + displays/menus/selectbuildservermenu.h displays/menus/selectmodemenu.h displays/menus/settingsmenu.h displays/menus/stationwifisettingsmenu.h diff --git a/main/actions/selectbuildserveraction.h b/main/actions/selectbuildserveraction.h new file mode 100644 index 0000000..61e87de --- /dev/null +++ b/main/actions/selectbuildserveraction.h @@ -0,0 +1,4 @@ +#pragma once + +#include "actioninterface.h" +#include "globals.h" diff --git a/main/buildserver.h b/main/buildserver.h new file mode 100644 index 0000000..e69de29 diff --git a/main/displays/menus/selectbuildservermenu.h b/main/displays/menus/selectbuildservermenu.h new file mode 100644 index 0000000..45029d2 --- /dev/null +++ b/main/displays/menus/selectbuildservermenu.h @@ -0,0 +1,45 @@ +#pragma once + +// local includes +#include "menudisplay.h" +#include "utils.h" +#include "actions/dummyaction.h" +#include "actions/selectbuildserveraction.h" +#include "icons/back.h" +#include "texts.h" +#include "globals.h" + + +// forward declares +namespace { +class SettingsMenu; +} // namespace + +using namespace espgui; + +namespace { + +class SelectBuildServerMenu : + public MenuDisplay, + public StaticText, + public BackActionInterface> +{ +public: + SelectBuildServerMenu() { + + /* + for (auto index = 0; index < stringSettings.otaServers.size(); index++) + { + auto otaServer = stringSettings.otaServers[index]; + std::string url = otaServer.url; + std::string name = (otaServer.name.empty()) ? url : otaServer.name; + + auto menuitem = constructMenuItem>(); + menuitem.setTitle(name); + } + */ + + constructMenuItem, SwitchScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>(); + } +}; +} // namespace diff --git a/main/displays/menus/settingsmenu.h b/main/displays/menus/settingsmenu.h index 9ae9248..7c297ba 100644 --- a/main/displays/menus/settingsmenu.h +++ b/main/displays/menus/settingsmenu.h @@ -16,6 +16,7 @@ #include "icons/info.h" #include "icons/demos.h" #include "icons/back.h" +#include "icons/update.h" #include "texts.h" #include "globals.h" #include "accessors/settingsaccessors.h" @@ -35,6 +36,7 @@ class BuzzerMenu; class AboutMenu; class MainMenu; class CrashMenu; +class SelectBuildServerMenu; } using namespace espgui; @@ -74,6 +76,9 @@ public: #endif #ifdef FEATURE_CLOUD constructMenuItem, SwitchScreenAction>>(); +#endif +#ifdef FEATURE_OTA + constructMenuItem, SwitchScreenAction, StaticMenuItemIcon<&icons::update>>>(); #endif constructMenuItem, SwitchScreenAction, StaticMenuItemIcon<&bobbyicons::time>>>(); constructMenuItem, SwitchScreenAction>>(); diff --git a/main/globals.h b/main/globals.h index 5909e73..b6d725e 100644 --- a/main/globals.h +++ b/main/globals.h @@ -45,7 +45,7 @@ char deviceName[32] = STRING(DEVICE_PREFIX) "_ERR"; #include GLOBALS_PLUGIN #endif -#if defined(HAS_SIMPLIFIED) +#if !defined(HAS_SIMPLIFIED) bool simplified = true; #else bool simplified = false; diff --git a/main/main.cpp b/main/main.cpp index a1a0932..39f794e 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -127,6 +127,7 @@ using namespace std::chrono_literals; #include "serialhandler.h" #ifdef FEATURE_OTA #include "ota.h" +#include "displays/menus/selectbuildservermenu.h" #endif #include "presets.h" #include "statistics.h" diff --git a/main/presets.h b/main/presets.h index fecfd56..f784078 100644 --- a/main/presets.h +++ b/main/presets.h @@ -297,6 +297,7 @@ constexpr Settings defaultSettings { StringSettings makeDefaultStringSettings() { using ConfiguredWifi = StringSettings::ConfiguredWifi; + using ConfiguredOtaServer = StringSettings::ConfiguredOtaServer; return { .wifis = std::array { @@ -322,6 +323,20 @@ StringSettings makeDefaultStringSettings() #endif #ifdef FEATURE_NTP .timeServer = "europe.pool.ntp.org", +#endif +#ifdef FEATURE_OTA + .otaServers = std::array { + ConfiguredOtaServer { .name = {}, .url = {} }, + ConfiguredOtaServer { .name = {}, .url = {} }, + ConfiguredOtaServer { .name = {}, .url = {} }, + ConfiguredOtaServer { .name = {}, .url = {} }, + ConfiguredOtaServer { .name = {}, .url = {} }, + ConfiguredOtaServer { .name = {}, .url = {} }, + ConfiguredOtaServer { .name = {}, .url = {} }, + ConfiguredOtaServer { .name = {}, .url = {} }, + ConfiguredOtaServer { .name = {}, .url = {} }, + ConfiguredOtaServer { .name = {}, .url = {} }, + }, #endif }; } diff --git a/main/stringsettings.h b/main/stringsettings.h index e3ec0f7..3dd1300 100644 --- a/main/stringsettings.h +++ b/main/stringsettings.h @@ -36,6 +36,15 @@ struct StringSettings template void executeForEveryProfileSetting(T &&callable); + +#ifdef FEATURE_OTA + struct ConfiguredOtaServer { + std::string name; + std::string url; + }; + + std::array otaServers; +#endif }; template @@ -76,6 +85,28 @@ void StringSettings::executeForEveryCommonSetting(T &&callable) #ifdef FEATURE_NTP callable("timeServer", timeServer); #endif +#ifdef FEATURE_OTA + callable("otaName0", otaServers[0].name); + callable("otaUrl0", otaServers[0].url); + callable("otaName1", otaServers[1].name); + callable("otaUrl1", otaServers[1].url); + callable("otaName2", otaServers[2].name); + callable("otaUrl2", otaServers[2].url); + callable("otaName3", otaServers[3].name); + callable("otaUrl3", otaServers[3].url); + callable("otaName4", otaServers[4].name); + callable("otaUrl4", otaServers[4].url); + callable("otaName5", otaServers[5].name); + callable("otaUrl5", otaServers[5].url); + callable("otaName6", otaServers[6].name); + callable("otaUrl6", otaServers[6].url); + callable("otaName7", otaServers[7].name); + callable("otaUrl7", otaServers[7].url); + callable("otaName8", otaServers[8].name); + callable("otaUrl8", otaServers[8].url); + callable("otaName9", otaServers[9].name); + callable("otaUrl9", otaServers[9].url); +#endif } template diff --git a/main/texts.h b/main/texts.h index fa4961f..e039300 100644 --- a/main/texts.h +++ b/main/texts.h @@ -471,6 +471,9 @@ constexpr char TEXT_CRASHMENU[] = "Crash Menu"; constexpr char TEXT_CRASH_ASSERT[] = "assert(0)"; constexpr char TEXT_CRASH_DIVZERO[] = "42 / 0"; +//SelectBuildServerMenu +constexpr char TEXT_SELECTBUILDSERVERMENU[] = "Select Buildserver"; + #ifdef FEATURE_CAN constexpr char TEXT_POWERSUPPLY[] = "Powersupply"; #endif From b2b9f97dce6f1d5c263a28a56ac403b026b5faa0 Mon Sep 17 00:00:00 2001 From: CommanderRedYT Date: Mon, 18 Oct 2021 13:35:18 +0200 Subject: [PATCH 09/11] Kinda implemented build server selection (does not work) --- main/displays/menus/selectbuildservermenu.h | 16 ++++++++++++---- main/presets.h | 8 ++++---- main/stringsettings.h | 6 +++--- main/texts.h | 1 + 4 files changed, 20 insertions(+), 11 deletions(-) diff --git a/main/displays/menus/selectbuildservermenu.h b/main/displays/menus/selectbuildservermenu.h index 45029d2..21cf7fe 100644 --- a/main/displays/menus/selectbuildservermenu.h +++ b/main/displays/menus/selectbuildservermenu.h @@ -27,17 +27,25 @@ class SelectBuildServerMenu : public: SelectBuildServerMenu() { - /* + auto numDisplayedServers = 0; + for (auto index = 0; index < stringSettings.otaServers.size(); index++) { auto otaServer = stringSettings.otaServers[index]; std::string url = otaServer.url; std::string name = (otaServer.name.empty()) ? url : otaServer.name; - auto menuitem = constructMenuItem>(); - menuitem.setTitle(name); + if (!name.empty()) { + auto menuitem = constructMenuItem>(); + menuitem.setTitle(name); + numDisplayedServers++; + } + } + + if (!numDisplayedServers) + { + constructMenuItem, DummyAction>>(); } - */ constructMenuItem, SwitchScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>(); } diff --git a/main/presets.h b/main/presets.h index f784078..afcfa1c 100644 --- a/main/presets.h +++ b/main/presets.h @@ -325,10 +325,9 @@ StringSettings makeDefaultStringSettings() .timeServer = "europe.pool.ntp.org", #endif #ifdef FEATURE_OTA - .otaServers = std::array { - ConfiguredOtaServer { .name = {}, .url = {} }, - ConfiguredOtaServer { .name = {}, .url = {} }, - ConfiguredOtaServer { .name = {}, .url = {} }, + .otaServers = std::array { + ConfiguredOtaServer { .name = {}, .url = {} }, + ConfiguredOtaServer { .name = {}, .url = {} },/* ConfiguredOtaServer { .name = {}, .url = {} }, ConfiguredOtaServer { .name = {}, .url = {} }, ConfiguredOtaServer { .name = {}, .url = {} }, @@ -336,6 +335,7 @@ StringSettings makeDefaultStringSettings() ConfiguredOtaServer { .name = {}, .url = {} }, ConfiguredOtaServer { .name = {}, .url = {} }, ConfiguredOtaServer { .name = {}, .url = {} }, + ConfiguredOtaServer { .name = {}, .url = {} },*/ }, #endif }; diff --git a/main/stringsettings.h b/main/stringsettings.h index 3dd1300..835c890 100644 --- a/main/stringsettings.h +++ b/main/stringsettings.h @@ -43,7 +43,7 @@ struct StringSettings std::string url; }; - std::array otaServers; + std::array otaServers; #endif }; @@ -89,7 +89,7 @@ void StringSettings::executeForEveryCommonSetting(T &&callable) callable("otaName0", otaServers[0].name); callable("otaUrl0", otaServers[0].url); callable("otaName1", otaServers[1].name); - callable("otaUrl1", otaServers[1].url); + callable("otaUrl1", otaServers[1].url);/* callable("otaName2", otaServers[2].name); callable("otaUrl2", otaServers[2].url); callable("otaName3", otaServers[3].name); @@ -105,7 +105,7 @@ void StringSettings::executeForEveryCommonSetting(T &&callable) callable("otaName8", otaServers[8].name); callable("otaUrl8", otaServers[8].url); callable("otaName9", otaServers[9].name); - callable("otaUrl9", otaServers[9].url); + callable("otaUrl9", otaServers[9].url);*/ #endif } diff --git a/main/texts.h b/main/texts.h index e039300..6ad8451 100644 --- a/main/texts.h +++ b/main/texts.h @@ -473,6 +473,7 @@ constexpr char TEXT_CRASH_DIVZERO[] = "42 / 0"; //SelectBuildServerMenu constexpr char TEXT_SELECTBUILDSERVERMENU[] = "Select Buildserver"; +constexpr char TEXT_NOBUILDSERVERCONFIGURED[] = "Not configured"; #ifdef FEATURE_CAN constexpr char TEXT_POWERSUPPLY[] = "Powersupply"; From 7433b3fd7ccc598ad7ee9939b07668ce590b4a0a Mon Sep 17 00:00:00 2001 From: CommanderRedYT Date: Mon, 18 Oct 2021 13:37:56 +0200 Subject: [PATCH 10/11] Kinda implemented build server selection (does not work) --- main/globals.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/globals.h b/main/globals.h index b6d725e..5909e73 100644 --- a/main/globals.h +++ b/main/globals.h @@ -45,7 +45,7 @@ char deviceName[32] = STRING(DEVICE_PREFIX) "_ERR"; #include GLOBALS_PLUGIN #endif -#if !defined(HAS_SIMPLIFIED) +#if defined(HAS_SIMPLIFIED) bool simplified = true; #else bool simplified = false; From 40af304083046cfdd3d0e751385f18287cc2c30e Mon Sep 17 00:00:00 2001 From: 0xFEEDC0DE64 Date: Mon, 18 Oct 2021 14:50:53 +0200 Subject: [PATCH 11/11] rebase fix --- main/displays/menus/settingsmenu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/displays/menus/settingsmenu.h b/main/displays/menus/settingsmenu.h index 7c297ba..bbbdfd7 100644 --- a/main/displays/menus/settingsmenu.h +++ b/main/displays/menus/settingsmenu.h @@ -78,7 +78,7 @@ public: constructMenuItem, SwitchScreenAction>>(); #endif #ifdef FEATURE_OTA - constructMenuItem, SwitchScreenAction, StaticMenuItemIcon<&icons::update>>>(); + constructMenuItem, SwitchScreenAction, StaticMenuItemIcon<&bobbyicons::update>>>(); #endif constructMenuItem, SwitchScreenAction, StaticMenuItemIcon<&bobbyicons::time>>>(); constructMenuItem, SwitchScreenAction>>();