From 9fb9ffe5dc8dd35f1f4b06321ac187b8315d9be3 Mon Sep 17 00:00:00 2001 From: olliw42 Date: Sun, 13 Oct 2024 14:56:41 +0200 Subject: [PATCH] AP_OSD: use RC().get_link_stats() for extra stats --- libraries/AP_OSD/AP_OSD_Screen.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/AP_OSD/AP_OSD_Screen.cpp b/libraries/AP_OSD/AP_OSD_Screen.cpp index 947203c3ab8126..1b0a9c21567e75 100644 --- a/libraries/AP_OSD/AP_OSD_Screen.cpp +++ b/libraries/AP_OSD/AP_OSD_Screen.cpp @@ -2064,7 +2064,7 @@ bool AP_OSD_Screen::is_btfl_fonts() void AP_OSD_Screen::draw_rc_tx_power(uint8_t x, uint8_t y) { - const int16_t tx_power = AP::crsf()->get_link_status().tx_power; + const int16_t tx_power = AP::RC().get_link_status().tx_power; bool btfl = is_btfl_fonts(); if (tx_power > 0) { if (tx_power < 1000) { @@ -2092,7 +2092,7 @@ void AP_OSD_Screen::draw_rc_tx_power(uint8_t x, uint8_t y) void AP_OSD_Screen::draw_rc_rssi_dbm(uint8_t x, uint8_t y) { - const int8_t rssidbm = AP::crsf()->get_link_status().rssi_dbm; + const int8_t rssidbm = AP::RC().get_link_status().rssi_dbm; const bool blink = -rssidbm < osd->warn_rssi; bool btfl = is_btfl_fonts(); @@ -2115,7 +2115,7 @@ void AP_OSD_Screen::draw_rc_rssi_dbm(uint8_t x, uint8_t y) void AP_OSD_Screen::draw_rc_snr(uint8_t x, uint8_t y) { - const int8_t snr = AP::crsf()->get_link_status().snr; + const int8_t snr = AP::RC().get_link_status().snr; const bool blink = snr < osd->warn_snr; bool btfl = is_btfl_fonts(); if (snr == INT8_MIN) { @@ -2154,7 +2154,7 @@ void AP_OSD_Screen::draw_rc_active_antenna(uint8_t x, uint8_t y) void AP_OSD_Screen::draw_rc_lq(uint8_t x, uint8_t y) { - const int16_t lqv = AP::crsf()->get_link_status().link_quality; + const int16_t lqv = AP::RC().get_link_status().link_quality; const bool blink = lqv < osd->warn_lq; bool btfl = is_btfl_fonts(); bool prefix_rf = check_option(AP_OSD::OPTION_RF_MODE_ALONG_WITH_LQ);