mirror of
https://github.com/markqvist/RNode_Firmware.git
synced 2026-04-27 14:30:33 +00:00
Show IFAC provisioning state on LoRa complication
LoRa label shows "NO KEY" in red when ifac_configured is false, indicating the watch needs IFAC key provisioning via rnsd before beacons will be accepted by the network. Also fixes LoRa toggle: check lora_freq == 0xFFFFFFFF (erased EEPROM), clear gesture bubble on all complication cells for reliable tap detection near tileview edges.
This commit is contained in:
parent
816d34ce9a
commit
bd34315e40
1 changed files with 9 additions and 4 deletions
13
Gui.h
13
Gui.h
|
|
@ -194,13 +194,14 @@ void sensor_log_touch(int16_t x, int16_t y, bool pressed);
|
|||
// Forward declarations for filtered accel and noise (defined in .ino)
|
||||
extern volatile float imu_ax_f, imu_ay_f, imu_az_f;
|
||||
extern volatile float imu_noise;
|
||||
// Forward declarations for radio/GPS toggle (defined in .ino / GPS.h)
|
||||
// Forward declarations for radio/GPS toggle (defined in .ino / GPS.h / IfacAuth.h)
|
||||
bool startRadio();
|
||||
void stopRadio();
|
||||
void update_radio_lock();
|
||||
void gps_power_on();
|
||||
void gps_power_off();
|
||||
void gps_setup();
|
||||
extern bool ifac_configured;
|
||||
#ifndef PMU_TEMP_MIN
|
||||
#define PMU_TEMP_MIN -30
|
||||
#endif
|
||||
|
|
@ -864,7 +865,7 @@ static void gui_update_data() {
|
|||
}
|
||||
lv_obj_align(gui_batt_label, LV_ALIGN_TOP_RIGHT, -GUI_PAD, GUI_STATUS_Y);
|
||||
|
||||
// LoRa complication — dim when disabled
|
||||
// LoRa complication — dim when disabled, warn when no IFAC
|
||||
if (radio_online) {
|
||||
if (last_rssi > -292) {
|
||||
lv_label_set_text_fmt(gui_lora_value, "%d", last_rssi);
|
||||
|
|
@ -872,11 +873,15 @@ static void gui_update_data() {
|
|||
lv_label_set_text(gui_lora_value, "---");
|
||||
}
|
||||
lv_obj_set_style_text_color(gui_lora_value, lv_color_hex(GUI_COL_AMBER), 0);
|
||||
lv_obj_set_style_text_color(gui_lora_label, lv_color_hex(GUI_COL_DIM), 0);
|
||||
lv_label_set_text(gui_lora_label, ifac_configured ? "LoRa" : "NO KEY");
|
||||
lv_obj_set_style_text_color(gui_lora_label,
|
||||
lv_color_hex(ifac_configured ? GUI_COL_DIM : GUI_COL_RED), 0);
|
||||
} else {
|
||||
lv_label_set_text(gui_lora_value, "OFF");
|
||||
lv_obj_set_style_text_color(gui_lora_value, lv_color_hex(0x302000), 0);
|
||||
lv_obj_set_style_text_color(gui_lora_label, lv_color_hex(0x302000), 0);
|
||||
lv_label_set_text(gui_lora_label, ifac_configured ? "LoRa" : "NO KEY");
|
||||
lv_obj_set_style_text_color(gui_lora_label,
|
||||
lv_color_hex(ifac_configured ? 0x302000 : GUI_COL_RED), 0);
|
||||
}
|
||||
|
||||
// GPS complication — dim when disabled, color by fix quality
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue