mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-09-28 21:56:38 +00:00
Merge pull request #2976 from fdlamotte/UITask_poweroff_radio_display
UI task: poweroff of radio and display moved to board
This commit is contained in:
@@ -697,9 +697,6 @@ void UITask::shutdown(bool restart){
|
|||||||
if (restart) {
|
if (restart) {
|
||||||
_board->reboot();
|
_board->reboot();
|
||||||
} else {
|
} else {
|
||||||
// still necessary until all boards are refactored to use poweroff
|
|
||||||
_display->turnOff();
|
|
||||||
radio_driver.powerOff();
|
|
||||||
// Power off board including radio, display, GPS and components
|
// Power off board including radio, display, GPS and components
|
||||||
_board->powerOff();
|
_board->powerOff();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -307,8 +307,6 @@ void UITask::shutdown(bool restart){
|
|||||||
if (restart) {
|
if (restart) {
|
||||||
_board->reboot();
|
_board->reboot();
|
||||||
} else {
|
} else {
|
||||||
_display->turnOff();
|
|
||||||
radio_driver.powerOff();
|
|
||||||
// Power off board including radio, display, GPS and components
|
// Power off board including radio, display, GPS and components
|
||||||
_board->powerOff();
|
_board->powerOff();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -566,8 +566,6 @@ void UITask::shutdown(bool restart){
|
|||||||
if (restart) {
|
if (restart) {
|
||||||
_board->reboot();
|
_board->reboot();
|
||||||
} else {
|
} else {
|
||||||
_display->turnOff();
|
|
||||||
radio_driver.powerOff();
|
|
||||||
// Power off board including radio, display, GPS and components
|
// Power off board including radio, display, GPS and components
|
||||||
_board->powerOff();
|
_board->powerOff();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -146,8 +146,6 @@ void UITask::loop() {
|
|||||||
digitalWrite(LED_PIN, LED_STATE_ON); // switch on the led until poweroff
|
digitalWrite(LED_PIN, LED_STATE_ON); // switch on the led until poweroff
|
||||||
#endif
|
#endif
|
||||||
if (millis() > _powering_off_at) {
|
if (millis() > _powering_off_at) {
|
||||||
_display->turnOff();
|
|
||||||
radio_driver.powerOff();
|
|
||||||
_board->powerOff(); // should not return
|
_board->powerOff(); // should not return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user