Merge branch 'master' into dev

This commit is contained in:
liquidraver
2026-07-03 19:58:07 +02:00
29 changed files with 1886 additions and 65 deletions
+40
View File
@@ -891,6 +891,46 @@ void ui_set_radio_params(uint32_t freq_hz, uint8_t sf, uint16_t bw_khz_x10,
s->lora_noise_floor = noise_floor;
}
void ui_set_radio_runtime(int8_t effective_tx_power, bool apc_enabled,
int8_t apc_reduction, int16_t apc_margin_x10,
uint8_t apc_target_margin, uint8_t sync_word,
uint16_t preamble_len, bool rx_duty_cycle,
bool radio_ready, bool in_rx, bool tx_active)
{
struct ui_state *s = get_state();
s->lora_effective_tx_power = effective_tx_power;
s->lora_apc_enabled = apc_enabled;
s->lora_apc_reduction = apc_reduction;
s->lora_apc_margin_x10 = apc_margin_x10;
s->lora_apc_target_margin = apc_target_margin;
s->lora_sync_word = sync_word;
s->lora_preamble_len = preamble_len;
s->lora_rx_duty_cycle = rx_duty_cycle;
s->lora_radio_ready = radio_ready;
s->lora_in_rx = in_rx;
s->lora_tx_active = tx_active;
}
void ui_set_radio_stats(uint32_t packets_rx, uint32_t packets_tx,
uint32_t packets_err)
{
struct ui_state *s = get_state();
bool activity_changed = packets_rx != s->lora_packets_rx ||
packets_tx != s->lora_packets_tx;
s->lora_packets_rx = packets_rx;
s->lora_packets_tx = packets_tx;
s->lora_packets_err = packets_err;
#ifdef CONFIG_ZEPHCORE_UI_DISPLAY
if (ui_initialized && activity_changed && mc_display_has_color() &&
ui_pages_current() == UI_PAGE_MESSAGES) {
schedule_render();
}
#endif
}
void ui_set_gps_data(bool has_fix, uint8_t sats,
int32_t lat_mdeg, int32_t lon_mdeg, int32_t alt_mm)
{