Skip to content

repeater: poweroff on long press#2883

Open
fdlamotte wants to merge 1 commit into
meshcore-dev:devfrom
fdlamotte:repeater_btn
Open

repeater: poweroff on long press#2883
fdlamotte wants to merge 1 commit into
meshcore-dev:devfrom
fdlamotte:repeater_btn

Conversation

@fdlamotte

@fdlamotte fdlamotte commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

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

Comment thread .vscode/extensions.json Outdated
@@ -1,4 +1,6 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I'll need to remove this ...
was added by pio ... should probably add this file to .gitignore ...

@fdlamotte

fdlamotte commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator Author

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

@fdlamotte

Copy link
Copy Markdown
Collaborator Author

seems not to work after sending some commands from LORA ...

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);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We have drawTextCentered() as shorthand for this

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

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 ...

@IoTThinks

Copy link
Copy Markdown
Contributor

_board.powerOff() will not turn off everything including power-hungry GPS module.
_board.powerOff() also does not power off the NRF52 on repeaters at all because repeaters are not soft-devices.

This PR will help to make your PR works.
#2895

@fdlamotte

Copy link
Copy Markdown
Collaborator Author

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

@fdlamotte fdlamotte changed the title WIP repeater: poweroff on long press repeater: poweroff on long press Jul 13, 2026
@IoTThinks

Copy link
Copy Markdown
Contributor

UI for repeater similar to companion is more friendlier to sleep.

Press to wakeup and allow to surf the UI for 30s...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants