ui.c: Fixed format string warnings
This commit is contained in:
parent
4101597ae5
commit
6c9d1834ad
|
|
@ -351,12 +351,12 @@ void _ui_drawVFOMiddle(state_t* last_state)
|
||||||
{
|
{
|
||||||
// Print VFO frequencies
|
// Print VFO frequencies
|
||||||
char freq_buf[20] = "";
|
char freq_buf[20] = "";
|
||||||
snprintf(freq_buf, sizeof(freq_buf), " Rx:%03lu.%05lu",
|
snprintf(freq_buf, sizeof(freq_buf), " Rx:%03u.%05u",
|
||||||
last_state->channel.rx_frequency/1000000,
|
last_state->channel.rx_frequency/1000000,
|
||||||
last_state->channel.rx_frequency%1000000/10);
|
last_state->channel.rx_frequency%1000000/10);
|
||||||
gfx_print(layout.line2_left, freq_buf, layout.line2_font, TEXT_ALIGN_CENTER,
|
gfx_print(layout.line2_left, freq_buf, layout.line2_font, TEXT_ALIGN_CENTER,
|
||||||
color_white);
|
color_white);
|
||||||
snprintf(freq_buf, sizeof(freq_buf), " Tx:%03lu.%05lu",
|
snprintf(freq_buf, sizeof(freq_buf), " Tx:%03u.%05u",
|
||||||
last_state->channel.tx_frequency/1000000,
|
last_state->channel.tx_frequency/1000000,
|
||||||
last_state->channel.tx_frequency%1000000/10);
|
last_state->channel.tx_frequency%1000000/10);
|
||||||
gfx_print(layout.line3_left, freq_buf, layout.line3_font, TEXT_ALIGN_CENTER,
|
gfx_print(layout.line3_left, freq_buf, layout.line3_font, TEXT_ALIGN_CENTER,
|
||||||
|
|
@ -375,7 +375,7 @@ void _ui_drawVFOMiddleInput(state_t* last_state, ui_state_t* ui_state)
|
||||||
{
|
{
|
||||||
if(ui_state->input_position == 0)
|
if(ui_state->input_position == 0)
|
||||||
{
|
{
|
||||||
snprintf(freq_buf, sizeof(freq_buf), ">Rx:%03lu.%05lu",
|
snprintf(freq_buf, sizeof(freq_buf), ">Rx:%03u.%05u",
|
||||||
ui_state->new_rx_frequency/1000000,
|
ui_state->new_rx_frequency/1000000,
|
||||||
ui_state->new_rx_frequency%1000000/10);
|
ui_state->new_rx_frequency%1000000/10);
|
||||||
gfx_print(layout.line2_left, freq_buf, layout.line2_font, TEXT_ALIGN_CENTER,
|
gfx_print(layout.line2_left, freq_buf, layout.line2_font, TEXT_ALIGN_CENTER,
|
||||||
|
|
@ -390,7 +390,7 @@ void _ui_drawVFOMiddleInput(state_t* last_state, ui_state_t* ui_state)
|
||||||
gfx_print(layout.line2_left, ui_state->new_rx_freq_buf, layout.line2_font, TEXT_ALIGN_CENTER,
|
gfx_print(layout.line2_left, ui_state->new_rx_freq_buf, layout.line2_font, TEXT_ALIGN_CENTER,
|
||||||
color_white);
|
color_white);
|
||||||
}
|
}
|
||||||
snprintf(freq_buf, sizeof(freq_buf), " Tx:%03lu.%05lu",
|
snprintf(freq_buf, sizeof(freq_buf), " Tx:%03u.%05u",
|
||||||
last_state->channel.tx_frequency/1000000,
|
last_state->channel.tx_frequency/1000000,
|
||||||
last_state->channel.tx_frequency%1000000/10);
|
last_state->channel.tx_frequency%1000000/10);
|
||||||
gfx_print(layout.line3_left, freq_buf, layout.line3_font, TEXT_ALIGN_CENTER,
|
gfx_print(layout.line3_left, freq_buf, layout.line3_font, TEXT_ALIGN_CENTER,
|
||||||
|
|
@ -398,7 +398,7 @@ void _ui_drawVFOMiddleInput(state_t* last_state, ui_state_t* ui_state)
|
||||||
}
|
}
|
||||||
else if(ui_state->input_set == SET_TX)
|
else if(ui_state->input_set == SET_TX)
|
||||||
{
|
{
|
||||||
snprintf(freq_buf, sizeof(freq_buf), " Rx:%03lu.%05lu",
|
snprintf(freq_buf, sizeof(freq_buf), " Rx:%03u.%05u",
|
||||||
ui_state->new_rx_frequency/1000000,
|
ui_state->new_rx_frequency/1000000,
|
||||||
ui_state->new_rx_frequency%1000000/10);
|
ui_state->new_rx_frequency%1000000/10);
|
||||||
gfx_print(layout.line2_left, freq_buf, layout.line2_font, TEXT_ALIGN_CENTER,
|
gfx_print(layout.line2_left, freq_buf, layout.line2_font, TEXT_ALIGN_CENTER,
|
||||||
|
|
@ -406,7 +406,7 @@ void _ui_drawVFOMiddleInput(state_t* last_state, ui_state_t* ui_state)
|
||||||
// Replace Rx frequency with underscorses
|
// Replace Rx frequency with underscorses
|
||||||
if(ui_state->input_position == 0)
|
if(ui_state->input_position == 0)
|
||||||
{
|
{
|
||||||
snprintf(freq_buf, sizeof(freq_buf), ">Tx:%03lu.%05lu",
|
snprintf(freq_buf, sizeof(freq_buf), ">Tx:%03u.%05u",
|
||||||
ui_state->new_rx_frequency/1000000,
|
ui_state->new_rx_frequency/1000000,
|
||||||
ui_state->new_rx_frequency%1000000/10);
|
ui_state->new_rx_frequency%1000000/10);
|
||||||
gfx_print(layout.line3_left, freq_buf, layout.line3_font, TEXT_ALIGN_CENTER,
|
gfx_print(layout.line3_left, freq_buf, layout.line3_font, TEXT_ALIGN_CENTER,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue