Skip to content

Commit

Permalink
osd: show crsf rf mode
Browse files Browse the repository at this point in the history
  • Loading branch information
bkleiner committed Sep 22, 2024
1 parent bf4b8a0 commit a997b51
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/osd/render.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@
#include "io/vtx.h"
#include "osd/menu.h"
#include "osd/status.h"
#include "rx/crsf.h"

#define ICON_RSSI 0x1
#define ICON_LQI 0x7b
#define ICON_CELSIUS 0xe
#define ICON_THROTTLE 0x4
#define ICON_VOLT 0x6
Expand Down Expand Up @@ -298,8 +300,14 @@ static void print_osd_rssi(osd_element_t *el) {
lpf(&rx_rssi_filt, state.rx_rssi, lpfcalc(state.looptime * 1e6f * 133.0f, 2e6f)); // 2 second filtertime and 15hz refresh rate @4k, 30hz@ 8k loop

osd_start(osd_attr(el), el->pos_x, el->pos_y);
osd_write_uint(rx_rssi_filt - 0.5f, 4);
osd_write_char(ICON_RSSI);
if (profile.receiver.protocol == RX_PROTOCOL_CRSF) {
osd_write_uint(crsf_stats.rf_mode, 1);
osd_write_char(":");
osd_write_uint(rx_rssi_filt - 0.5f, 2);
} else {
osd_write_uint(rx_rssi_filt - 0.5f, 4);
}
osd_write_char(ICON_LQI);
}

static void print_osd_crosshair(osd_element_t *el) {
Expand Down

0 comments on commit a997b51

Please sign in to comment.