AP_Notify: Display send_text made not static
This commit is contained in:
parent
07c08c09a3
commit
d12e0d6a82
@ -77,7 +77,6 @@ AP_Notify::AP_Notify()
|
||||
// static flags, to allow for direct class update from device drivers
|
||||
struct AP_Notify::notify_flags_and_values_type AP_Notify::flags;
|
||||
struct AP_Notify::notify_events_type AP_Notify::events;
|
||||
char AP_Notify::_send_text[NOTIFY_TEXT_BUFFER_SIZE] {};
|
||||
|
||||
#if CONFIG_HAL_BOARD == HAL_BOARD_PX4
|
||||
AP_BoardLED boardled;
|
||||
|
@ -122,16 +122,17 @@ public:
|
||||
|
||||
bool buzzer_enabled() const { return _buzzer_enable; }
|
||||
|
||||
static void send_text(const char *str);
|
||||
static char* get_text() { return _send_text; }
|
||||
// send text to display
|
||||
void send_text(const char *str);
|
||||
const char* get_text() const { return _send_text; }
|
||||
|
||||
private:
|
||||
static NotifyDevice* _devices[];
|
||||
|
||||
static char _send_text[NOTIFY_TEXT_BUFFER_SIZE];
|
||||
AP_Int8 _rgb_led_brightness;
|
||||
AP_Int8 _rgb_led_override;
|
||||
AP_Int8 _buzzer_enable;
|
||||
AP_Int8 _display_type;
|
||||
|
||||
char _send_text[NOTIFY_TEXT_BUFFER_SIZE];
|
||||
};
|
||||
|
@ -558,7 +558,7 @@ void Display::update_text(uint8_t r)
|
||||
char msg [DISPLAY_MESSAGE_SIZE];
|
||||
char txt [NOTIFY_TEXT_BUFFER_SIZE];
|
||||
|
||||
snprintf(txt, NOTIFY_TEXT_BUFFER_SIZE, "%s", AP_Notify::get_text());
|
||||
snprintf(txt, NOTIFY_TEXT_BUFFER_SIZE, "%s", pNotify->get_text());
|
||||
_mstartpos++;
|
||||
for (uint8_t i = 0; i < sizeof(msg); i++) {
|
||||
if (txt[i + _mstartpos - 1] != 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user