Skip to content

Commit

Permalink
AP_OSD: use RC().get_link_stats() for extra stats
Browse files Browse the repository at this point in the history
  • Loading branch information
olliw42 committed Oct 15, 2024
1 parent 7b429fd commit aebad75
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions libraries/AP_OSD/AP_OSD_Screen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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();

Expand All @@ -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) {
Expand All @@ -2135,7 +2135,7 @@ void AP_OSD_Screen::draw_rc_snr(uint8_t x, uint8_t y)

void AP_OSD_Screen::draw_rc_active_antenna(uint8_t x, uint8_t y)
{
const int8_t active_antenna = AP::crsf()->get_link_status().active_antenna;
const int8_t active_antenna = AP::RC().get_link_status().active_antenna;
bool btfl = is_btfl_fonts();
if (active_antenna < 0) {
if (btfl) {
Expand All @@ -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);
Expand Down

0 comments on commit aebad75

Please sign in to comment.