-
Notifications
You must be signed in to change notification settings - Fork 1
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
Put on-screen messages in a queue, display them one at a time #51
Conversation
pending_messages should contain no duplicates, and always have the time of the most recent message, and the count of each specific message.
It works for the first message, but crashes when you tap "OK" on the first message to clear it from the screen. It fails in Gui::msg_box_cb() when it tries to call gui->set_display_next_pending_message(true);. If I comment out that line, then it fails on gui->display_next_message(); I copied Gui::lv_mainbar_callback exactly (I think), but it still crashes.
Still want to see if I can update the currently-displayed message's time and count.
@JohnySeven, I think it has all the functionality that I wanted:
The display of the messages might be made prettier, but I think that's for another PR. Please review this one for my coding - I know it works, but I'm not sure I've done everything as efficiently as I could. After this is merged and we've both used it for a while, I will go back and remove all the logging messages. |
I've tested it and it really works very good! Tested it with my notifications sender script that I'm using and I like it! :-) Merging it. |
You have a "notifications sender script"? Something that can simulate notifications coming to the watch from SK? |
I'm sorry I've missed your comment, yes I do have it, it's in C# and it basically sends UDP packet to server to update notifications.{anyname} data. If you want I can make simple Console app that you can run for testing. |
No thanks - I don't need it anymore. And I really didn't need it all that much when I was testing. With a small butane cigar lighter I could make one of my temperature sensors get hot enough to throw an "alarm" whenever I needed one, and if I disabled my solar panels for just a few minutes, the battery voltage would drop low enough to throw a low voltage alarm. And if I needed 3 different alarms, I just turned off my wifi, which triggered that alarm. |
FIXED: It's crashing when the msg_btn_cb() function is called. It's supposed to display the next message in the pending_messages_ std::list, but it crashes as soon as any element of gui is accessed. See the detailed notes on the most recent commit.