diff --git a/openrtx/src/ui/ui_main.c b/openrtx/src/ui/ui_main.c index 72c2998a..b9b9c1f5 100644 --- a/openrtx/src/ui/ui_main.c +++ b/openrtx/src/ui/ui_main.c @@ -75,13 +75,13 @@ void _ui_drawVFOMiddle(state_t* last_state) // Print VFO frequencies char freq_buf[20] = ""; snprintf(freq_buf, sizeof(freq_buf), " Rx:%03lu.%05lu", - last_state->channel.rx_frequency/1000000, - last_state->channel.rx_frequency%1000000/10); + (unsigned long)last_state->channel.rx_frequency/1000000, + (unsigned long)last_state->channel.rx_frequency%1000000/10); gfx_print(layout.line2_left, freq_buf, layout.line2_font, TEXT_ALIGN_CENTER, color_white); snprintf(freq_buf, sizeof(freq_buf), " Tx:%03lu.%05lu", - last_state->channel.tx_frequency/1000000, - last_state->channel.tx_frequency%1000000/10); + (unsigned long)last_state->channel.tx_frequency/1000000, + (unsigned long)last_state->channel.tx_frequency%1000000/10); gfx_print(layout.line3_left, freq_buf, layout.line3_font, TEXT_ALIGN_CENTER, color_white); } @@ -94,13 +94,13 @@ void _ui_drawMEMMiddle(state_t* last_state) // Print Channel frequencies char freq_buf[20] = ""; snprintf(freq_buf, sizeof(freq_buf), " Rx:%03lu.%05lu", - last_state->channel.rx_frequency/1000000, - last_state->channel.rx_frequency%1000000/10); + (unsigned long)last_state->channel.rx_frequency/1000000, + (unsigned long)last_state->channel.rx_frequency%1000000/10); gfx_print(layout.line2_left, freq_buf, layout.line2_font, TEXT_ALIGN_CENTER, color_white); snprintf(freq_buf, sizeof(freq_buf), " Tx:%03lu.%05lu", - last_state->channel.tx_frequency/1000000, - last_state->channel.tx_frequency%1000000/10); + (unsigned long)last_state->channel.tx_frequency/1000000, + (unsigned long)last_state->channel.tx_frequency%1000000/10); gfx_print(layout.line3_left, freq_buf, layout.line3_font, TEXT_ALIGN_CENTER, color_white); } @@ -118,8 +118,8 @@ void _ui_drawVFOMiddleInput(state_t* last_state, ui_state_t* ui_state) if(ui_state->input_position == 0) { snprintf(freq_buf, sizeof(freq_buf), ">Rx:%03lu.%05lu", - ui_state->new_rx_frequency/1000000, - ui_state->new_rx_frequency%1000000/10); + (unsigned long)ui_state->new_rx_frequency/1000000, + (unsigned long)ui_state->new_rx_frequency%1000000/10); gfx_print(layout.line2_left, freq_buf, layout.line2_font, TEXT_ALIGN_CENTER, color_white); } @@ -133,24 +133,24 @@ void _ui_drawVFOMiddleInput(state_t* last_state, ui_state_t* ui_state) color_white); } snprintf(freq_buf, sizeof(freq_buf), " Tx:%03lu.%05lu", - last_state->channel.tx_frequency/1000000, - last_state->channel.tx_frequency%1000000/10); + (unsigned long)last_state->channel.tx_frequency/1000000, + (unsigned long)last_state->channel.tx_frequency%1000000/10); gfx_print(layout.line3_left, freq_buf, layout.line3_font, TEXT_ALIGN_CENTER, color_white); } else if(ui_state->input_set == SET_TX) { snprintf(freq_buf, sizeof(freq_buf), " Rx:%03lu.%05lu", - ui_state->new_rx_frequency/1000000, - ui_state->new_rx_frequency%1000000/10); + (unsigned long)ui_state->new_rx_frequency/1000000, + (unsigned long)ui_state->new_rx_frequency%1000000/10); gfx_print(layout.line2_left, freq_buf, layout.line2_font, TEXT_ALIGN_CENTER, color_white); // Replace Rx frequency with underscorses if(ui_state->input_position == 0) { snprintf(freq_buf, sizeof(freq_buf), ">Tx:%03lu.%05lu", - ui_state->new_rx_frequency/1000000, - ui_state->new_rx_frequency%1000000/10); + (unsigned long)ui_state->new_rx_frequency/1000000, + (unsigned long)ui_state->new_rx_frequency%1000000/10); gfx_print(layout.line3_left, freq_buf, layout.line3_font, TEXT_ALIGN_CENTER, color_white); }