diff --git a/meson.build b/meson.build index 9cd4dd34..8a56347f 100644 --- a/meson.build +++ b/meson.build @@ -11,7 +11,7 @@ project('OpenRTX', 'c', ## OpenRTX -openrtx_src = ['tests/platform/printContacts_MDx.c', +openrtx_src = ['openrtx/src/main.c', 'openrtx/src/bootstrap.c', 'openrtx/src/state.c', 'openrtx/src/ui.c', diff --git a/openrtx/src/ui.c b/openrtx/src/ui.c index 6f8dde8b..8ed673e0 100644 --- a/openrtx/src/ui.c +++ b/openrtx/src/ui.c @@ -221,10 +221,14 @@ void _ui_drawVFO(state_t* state) { // Print VFO frequencies char freq_buf[20] = ""; - snprintf(freq_buf, sizeof(freq_buf), "Rx: %09.5f", ((float) state->channel.rx_frequency)); + snprintf(freq_buf, sizeof(freq_buf), "Rx: %03d.%05d", + state->channel.rx_frequency/1000000, + state->channel.rx_frequency%1000000); gfx_print(layout.line2_pos, freq_buf, layout.line1_font, TEXT_ALIGN_CENTER, color_white); - snprintf(freq_buf, sizeof(freq_buf), "Tx: %09.5f", ((float) state->channel.tx_frequency)); + snprintf(freq_buf, sizeof(freq_buf), "Tx: %03d.%05d", + state->channel.tx_frequency/1000000, + state->channel.tx_frequency%1000000); gfx_print(layout.line3_pos, freq_buf, layout.line2_font, TEXT_ALIGN_CENTER, color_white); }