From 0045fb16b66b008c13888312b92688dcb7535a0c Mon Sep 17 00:00:00 2001 From: Neil O'Fix <69880003+nlfx@users.noreply.github.com> Date: Sat, 26 Jun 2021 18:53:32 +0000 Subject: SPI flash sleep if bootloader >= 1.0.0 (#322) * Retrieve and display bootloader version - Display bootloader version on System Info screen - Enable SPI flash sleep mode if bootloader version >= 1.0.0 * Wait for SPI flash to wakeup before starting OTA DFU --- src/displayapp/screens/SystemInfo.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/displayapp/screens/SystemInfo.cpp') diff --git a/src/displayapp/screens/SystemInfo.cpp b/src/displayapp/screens/SystemInfo.cpp index 1cf895c7..60e53ad6 100644 --- a/src/displayapp/screens/SystemInfo.cpp +++ b/src/displayapp/screens/SystemInfo.cpp @@ -3,6 +3,7 @@ #include "../DisplayApp.h" #include "Label.h" #include "Version.h" +#include "BootloaderVersion.h" #include "components/battery/BatteryController.h" #include "components/ble/BleController.h" #include "components/brightness/BrightnessController.h" @@ -83,17 +84,19 @@ std::unique_ptr SystemInfo::CreateScreen1() { lv_label_set_recolor(label, true); lv_label_set_text_fmt(label, "#FFFF00 InfiniTime#\n\n" - "#444444 Version# %ld.%ld.%ld\n\n" - "#444444 Short Ref# %s\n\n" + "#444444 Version# %ld.%ld.%ld\n" + "#444444 Short Ref# %s\n" "#444444 Build date#\n" "%s\n" - "%s\n", + "%s\n\n" + "#444444 Bootloader# %s", Version::Major(), Version::Minor(), Version::Patch(), Version::GitCommitHash(), __DATE__, - __TIME__); + __TIME__, + BootloaderVersion::VersionString()); lv_label_set_align(label, LV_LABEL_ALIGN_CENTER); lv_obj_align(label, lv_scr_act(), LV_ALIGN_CENTER, 0, 0); return std::make_unique(0, 5, app, label); -- cgit v1.2.3