Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Screen reverting back to last message after setFrame reload #4038

Closed
slash-bit opened this issue Jun 4, 2024 · 6 comments · Fixed by #4264
Closed

[Bug]: Screen reverting back to last message after setFrame reload #4038

slash-bit opened this issue Jun 4, 2024 · 6 comments · Fixed by #4264
Labels
device-screen Device Screen Enhancements enhancement New feature or request

Comments

@slash-bit
Copy link
Contributor

Category

Other

Hardware

T-Echo

Firmware Version

2.3.11

Description

I wanted to make a small contribution in relation to Screen Frame reload issue ( may be not such a big one) , but every time setFrame run the page reverts back to Message or Module frame , but not the same frame that was viewed by user before, which could be annoying having to manually switch back to say Status frame.
Here is the change needed, please have a look and comment if needed. I am happy to submit PR if all OK.
There are some caveats: After Resetting NodeDB or enabling / disabling a Module , the frame will not necessarily revert back to originally viewed frame. But after the device rebooted and there are more than 5 nodes in the list , it is quite stable.
Tested on T-Echo.
master...meshi-bit:meshtastic-echo-echo:screen-frames

Relevant log output

No response

@slash-bit slash-bit added the bug Something isn't working label Jun 4, 2024
@slash-bit slash-bit changed the title [Bug]: [Bug]: Screen reverting back to last message after setFrame reload Jun 4, 2024
@todd-herbert
Copy link
Contributor

Did we speak about this on the Discord server they other day? Would you be happy for me to sort out some of those caveats?

@slash-bit
Copy link
Contributor Author

Hey, yes it was me on discord :-) After some thinking , I though this OK to implement. But I am more than happy take help with getting rid off those caveats. Thanks ! :-)

@todd-herbert
Copy link
Contributor

Hey if you're happy with it, go for it! I might add some extras later on / tidy some E-Ink code that this replaces 👍

@caveman99
Copy link
Member

This needs a bit more polish, but it's a good start. If you draft a PR we can comment and build on it (e.g. what if framenum-2 doesn't exist as well?) :-)

@caveman99 caveman99 added enhancement New feature or request device-screen Device Screen Enhancements and removed bug Something isn't working labels Jun 5, 2024
@slash-bit
Copy link
Contributor Author

Just saw the comments and created a PR as Draft now.
#4043

@slash-bit
Copy link
Contributor Author

Yes, the (numframes - 2) is not ideal. I will do some checks, what is the absolute minimum number of frames possible. I believe it should be at least 2.
Or we can revert back to frame 0, if the currentFrameNum happens to be outside of frames available (numframes)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
device-screen Device Screen Enhancements enhancement New feature or request
Projects
None yet
3 participants