Skip to content

Commit

Permalink
Update bbn_m5tough_active_boat.ino
Browse files Browse the repository at this point in the history
  • Loading branch information
mgrouch authored May 16, 2023
1 parent 8ff6d92 commit 8b9b178
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions bbn_m5tough_active_boat/bbn_m5tough_active_boat.ino
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,11 @@ void setup() {
init_theme();
rtc_begin();

page = restore_page();
if (page < 0 || page >= pages_count) {
page = 0;
}

settingUpWiFi([]() {
init_dateTime();

Expand Down Expand Up @@ -281,6 +286,7 @@ void loop() {
if (!settingMode) {
if (last_touched > 0 && millis() - last_touched > GO_SLEEP_TIMEOUT) {
disconnect_clients();
save_page(page);
deep_sleep_with_touch_wakeup();
} else {
if (victron_mqtt_began) {
Expand Down

0 comments on commit 8b9b178

Please sign in to comment.