Make firmware updating more foolproof (#469)
* Make firmware updating more foolproof and fix bugs * No need to manually handle overflow * Make startTime TickType_t * Don't process TouchEvents::None * Fix sleep getting re-enabled issue more directly
This commit is contained in:
@@ -177,9 +177,13 @@ void DisplayApp::Refresh() {
|
||||
}
|
||||
break;
|
||||
case Messages::TouchEvent: {
|
||||
if (state != States::Running)
|
||||
if (state != States::Running) {
|
||||
break;
|
||||
}
|
||||
auto gesture = OnTouchEvent();
|
||||
if (gesture == TouchEvents::None) {
|
||||
break;
|
||||
}
|
||||
if (!currentScreen->OnTouchEvent(gesture)) {
|
||||
if (currentApp == Apps::Clock) {
|
||||
switch (gesture) {
|
||||
@@ -286,6 +290,7 @@ void DisplayApp::LoadApp(Apps app, DisplayApp::FullRefreshDirections direction)
|
||||
break;
|
||||
case Apps::FirmwareUpdate:
|
||||
currentScreen = std::make_unique<Screens::FirmwareUpdate>(this, bleController);
|
||||
ReturnApp(Apps::Clock, FullRefreshDirections::Down, TouchEvents::None);
|
||||
break;
|
||||
|
||||
case Apps::Notifications:
|
||||
|
Reference in New Issue
Block a user