mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-02-18 21:54:08 -05:00
fix unused warning (#1970)
This commit is contained in:
parent
2ac36d2d0b
commit
986e37a3c9
@ -172,24 +172,26 @@ void LevelView::on_statistics_update(const ChannelStatistics& statistics) {
|
|||||||
}
|
}
|
||||||
// refresh sat
|
// refresh sat
|
||||||
uint8_t rx_sat = ((uint32_t)shared_memory.m4_performance_counter) * 100 / 127;
|
uint8_t rx_sat = ((uint32_t)shared_memory.m4_performance_counter) * 100 / 127;
|
||||||
last_rx_sat = rx_sat;
|
if (last_rx_sat != rx_sat) {
|
||||||
freq_stats_rx.set("RxSat: " + to_string_dec_uint(rx_sat) + "%");
|
last_rx_sat = rx_sat;
|
||||||
uint8_t br = 0;
|
freq_stats_rx.set("RxSat: " + to_string_dec_uint(rx_sat) + "%");
|
||||||
uint8_t bg = 0;
|
uint8_t br = 0;
|
||||||
uint8_t bb = 0;
|
uint8_t bg = 0;
|
||||||
if (rx_sat <= 80) {
|
uint8_t bb = 0;
|
||||||
bg = (255 * rx_sat) / 80;
|
if (rx_sat <= 80) {
|
||||||
bb = 255 - bg;
|
bg = (255 * rx_sat) / 80;
|
||||||
} else if (rx_sat > 80) {
|
bb = 255 - bg;
|
||||||
br = (255 * (rx_sat - 80)) / 20;
|
} else if (rx_sat > 80) {
|
||||||
bg = 255 - br;
|
br = (255 * (rx_sat - 80)) / 20;
|
||||||
|
bg = 255 - br;
|
||||||
|
}
|
||||||
|
Style style_freq_stats_rx{
|
||||||
|
.font = font::fixed_8x16,
|
||||||
|
.background = {br, bg, bb},
|
||||||
|
.foreground = {255, 255, 255},
|
||||||
|
};
|
||||||
|
freq_stats_rx.set_style(&style_freq_stats_rx);
|
||||||
}
|
}
|
||||||
Style style_freq_stats_rx{
|
|
||||||
.font = font::fixed_8x16,
|
|
||||||
.background = {br, bg, bb},
|
|
||||||
.foreground = {255, 255, 255},
|
|
||||||
};
|
|
||||||
freq_stats_rx.set_style(&style_freq_stats_rx);
|
|
||||||
|
|
||||||
} /* on_statistic_updates */
|
} /* on_statistic_updates */
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user