mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-03-30 17:05:52 +00:00
companion: Suspend radio when hibernating
This should significantly reduce power consumption in hibernation. Fixes: #1014 Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com> Signed-off-by: Frieder Schrempf <frieder@fris.de> # generalize for all radios and UIs
This commit is contained in:
committed by
Frieder Schrempf
parent
f5a56c537f
commit
07e7e2d44b
@@ -650,6 +650,7 @@ void UITask::shutdown(bool restart){
|
||||
_board->reboot();
|
||||
} else {
|
||||
_display->turnOff();
|
||||
radio_driver.powerOff();
|
||||
_board->powerOff();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -292,10 +292,12 @@ void UITask::shutdown(bool restart){
|
||||
|
||||
#endif // PIN_BUZZER
|
||||
|
||||
if (restart)
|
||||
if (restart) {
|
||||
_board->reboot();
|
||||
else
|
||||
} else {
|
||||
radio_driver.powerOff();
|
||||
_board->powerOff();
|
||||
}
|
||||
}
|
||||
|
||||
void UITask::loop() {
|
||||
|
||||
Reference in New Issue
Block a user