Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions examples/companion_radio/ui-new/UITask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,13 @@ void UITask::shutdown(bool restart){
if (restart) {
_board->reboot();
} else {
delay(2000);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need such a long delay here?

Copy link
Contributor Author

@ViezeVingertjes ViezeVingertjes Dec 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably not, its just so the "Hibernating..." message has some time. But still need to measure it, it seems that i had different results with latest version from the version vs dev, the issue with the LED etc that kept drawing power might already been solved in another way in the time between.

#ifdef DISPLAY_CLASS
extern DISPLAY_CLASS display;
display.hibernate();
#else
_display->turnOff();
#endif
radio_driver.powerOff();
_board->powerOff();
}
Expand Down
8 changes: 8 additions & 0 deletions src/helpers/ui/GxEPDDisplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,14 @@ void GxEPDDisplay::turnOff() {
_isOn = false;
}

void GxEPDDisplay::hibernate() {
display.fillScreen(GxEPD_BLACK);
display.display(false);
display.fillScreen(GxEPD_WHITE);
display.display(false);
display.hibernate();
}

void GxEPDDisplay::clear() {
display.fillScreen(GxEPD_WHITE);
display.setTextColor(GxEPD_BLACK);
Expand Down
1 change: 1 addition & 0 deletions src/helpers/ui/GxEPDDisplay.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ class GxEPDDisplay : public DisplayDriver {
bool isOn() override {return _isOn;};
void turnOn() override;
void turnOff() override;
void hibernate();
void clear() override;
void startFrame(Color bkg = DARK) override;
void setTextSize(int sz) override;
Expand Down
25 changes: 25 additions & 0 deletions variants/lilygo_techo/TechoBoard.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include <MeshCore.h>
#include <Arduino.h>
#include <Wire.h>
#include <helpers/NRF52Board.h>

// built-ins
Expand All @@ -26,18 +27,42 @@ class TechoBoard : public NRF52BoardOTA {
void powerOff() override {
#ifdef LED_RED
digitalWrite(LED_RED, HIGH);
pinMode(LED_RED, INPUT_PULLUP);
#endif
#ifdef LED_GREEN
digitalWrite(LED_GREEN, HIGH);
pinMode(LED_GREEN, INPUT_PULLUP);
#endif
#ifdef LED_BLUE
digitalWrite(LED_BLUE, HIGH);
pinMode(LED_BLUE, INPUT_PULLUP);
#endif
#ifdef DISP_BACKLIGHT
digitalWrite(DISP_BACKLIGHT, LOW);
pinMode(DISP_BACKLIGHT, INPUT_PULLDOWN);
#endif
#ifdef GPS_EN
digitalWrite(GPS_EN, LOW);
pinMode(GPS_EN, INPUT_PULLDOWN);
#endif
#ifdef PIN_GPS_RESET
digitalWrite(PIN_GPS_RESET, LOW);
pinMode(PIN_GPS_RESET, INPUT_PULLDOWN);
#endif
Wire.end();
#ifdef PIN_WIRE_SDA
pinMode(PIN_WIRE_SDA, INPUT_PULLUP);
#endif
#ifdef PIN_WIRE_SCL
pinMode(PIN_WIRE_SCL, INPUT_PULLUP);
#endif
#ifdef SX126X_POWER_EN
digitalWrite(SX126X_POWER_EN, LOW);
pinMode(SX126X_POWER_EN, INPUT);
#endif
#ifdef PIN_PWR_EN
digitalWrite(PIN_PWR_EN, LOW);
pinMode(PIN_PWR_EN, INPUT);
#endif
sd_power_system_off();
}
Expand Down