repeater: poweroff on long press#2883
Conversation
| @@ -1,4 +1,6 @@ | |||
| { | |||
| // See http://go.microsoft.com/fwlink/?LinkId=827846 | |||
There was a problem hiding this comment.
I'll need to remove this ...
was added by pio ... should probably add this file to .gitignore ...
|
seems not to work after sending some commands from LORA ... edit: this only happened to me on TEcho for the moment, maybe some issue specific to this board ... noticed some incoherencies in btn init (pullups or not ...), might also have to do with eink screen refresh will have to check the loop. This does not prevent to poweroff the node as one just need to reboot it before powering off |
This was a screen refresh issue on techo, it has been solved Now I'll check result of compilation |
| // meshcore website | ||
| const char* website = "https://meshcore.io"; | ||
| _display->setColor(DisplayDriver::LIGHT); | ||
| _display->setTextSize(1); |
There was a problem hiding this comment.
We have drawTextCentered() as shorthand for this
There was a problem hiding this comment.
right, and I should know that ;)
I'll try to move the poweroff logic out of the ui (the 3s timeout), to enable a poweroff command that would actually show on the screen that the repeater is powering off
the ui would only initiate the sequence ...
|
_board.powerOff() will not turn off everything including power-hungry GPS module. This PR will help to make your PR works. |
|
Well in the end poweroff is already implemented in the CLI (it only did not work on my techo before #2895) So I won't bother changing current mechanism in this PR, it will stay as it is Further work should focus on implementing minimal UI support for boards that don't have screen but have buttons that can be used to poweroff. Also repeater UI could be better, some screen to show status, neighbors, control adverts, show gps status ... could help |
|
UI for repeater similar to companion is more friendlier to sleep. Press to wakeup and allow to surf the UI for 30s... |
changed the button login in repeater to use MomentaryButton as in companion radio
implemented poweroff on long press
tested on TEcho, Thinknode M5 and heltec_v3
should support all repeaters with display
might need some review of all variants to see if it breaks, could support all repeaters with buttons by adding a null display