diff options
author | Neil O'Fix <69880003+nlfx@users.noreply.github.com> | 2021-06-26 18:53:32 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-26 20:53:32 +0200 |
commit | 0045fb16b66b008c13888312b92688dcb7535a0c (patch) | |
tree | ae945a9184c1fe5f47003c9a6ef8e05a389d9f25 /src/displayapp/screens | |
parent | 883700fca13a45b6cb0af4d74e3ef276a2d69283 (diff) |
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
Diffstat (limited to 'src/displayapp/screens')
-rw-r--r-- | src/displayapp/screens/SystemInfo.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
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<Screen> 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<Screens::Label>(0, 5, app, label); |