-
Notifications
You must be signed in to change notification settings - Fork 17.5k
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
Added send_text via scripting for onboard display #26066
Added send_text via scripting for onboard display #26066
Conversation
We do have a previous PR for this, #15857. It looks like this is a "forever" override? Can you revert to AP control? |
Curious, by the looks the other PR went quiet? Yeah can do, just didn't add it as it wasn't required for our use. I can either add a timeout like in the other PR, or add a func to release a row, or both, what do you think is best? All that needs to be done is unsetting the bit. |
Yeah, It just got forgotten about.
I think a reset method would be good, the timeout thing is unnecessarily fancy I think. |
libraries/AP_Notify/AP_Notify.h
Outdated
@@ -248,6 +252,8 @@ class AP_Notify | |||
uint32_t _send_text_updated_millis; // last time text changed | |||
char _flight_mode_str[5]; | |||
|
|||
uint8_t _send_text_src_override = 0; //Bitmask of what lines send_text_src should override |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be in the display backend.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bump.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
send_text and send_text_scripting currently treats all screens as duplicates, basically state information is common between backends, duplicating the variables in backend doesn't make sense with current structure. We are keeping standard send_text related variable here as well. So, again they all are sitting together as they should.
40046b1
to
175a757
Compare
libraries/AP_Notify/AP_Notify.h
Outdated
@@ -248,6 +252,8 @@ class AP_Notify | |||
uint32_t _send_text_updated_millis; // last time text changed | |||
char _flight_mode_str[5]; | |||
|
|||
uint8_t _send_text_src_override = 0; //Bitmask of what lines send_text_src should override |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bump.
c7ef6c3
to
3187394
Compare
3f00ac9
to
6f61b79
Compare
Added a send_test_src method to override the text on the display and display custom text on a given row
Added a notify:send_text and notify:release_text binding to override the text displayed on a display with custom text
6f61b79
to
68741f9
Compare
Battery changes done in #26106 and scripting defines added.
Added the ability to override the default text on the onboard oled display using scripting.
One can use notify:send_text(text, row) to update a given row on the display, this will take priority over the default. You can replace the entire screen or any desired line, for example if i don't care about battery i can use scripting to replace it with other information.
This has been tested on a Cube Orange Plus with a SSH1106.