Fix frequency representation bug

Divide the frequency decimals by ten to ensure the we do not overflow
the 5 digits we can fit into the available space on the screen.
replace/0a79391a909ed0f11846108a8461c8a35ac5148a
Niccolò Izzo 2020-11-27 16:30:12 +01:00
rodzic 8b877ed6d0
commit 87ec8389cd
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -223,14 +223,14 @@ void _ui_drawVFO(state_t* state)
char freq_buf[20] = "";
snprintf(freq_buf, sizeof(freq_buf), "Rx: %03ld.%05ld",
state->channel.rx_frequency/1000000,
state->channel.rx_frequency%1000000);
state->channel.rx_frequency%1000000/10);
gfx_print(layout.line2_pos, freq_buf, layout.line1_font, TEXT_ALIGN_CENTER,
color_white);
snprintf(freq_buf, sizeof(freq_buf), "Tx: %03ld.%05ld",
state->channel.tx_frequency/1000000,
state->channel.tx_frequency%1000000);
state->channel.tx_frequency%1000000/10);
gfx_print(layout.line3_pos, freq_buf, layout.line2_font, TEXT_ALIGN_CENTER,
color_white);