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
This commit is contained in:
Neil O'Fix
2021-06-26 18:53:32 +00:00
committed by GitHub
parent 883700fca1
commit 0045fb16b6
6 changed files with 50 additions and 19 deletions

View File

@@ -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);