router-late (#131)

This commit is contained in:
Manuel
2025-05-18 16:41:20 +02:00
committed by GitHub
parent 55f71527f3
commit 48e963f164
4 changed files with 9 additions and 3 deletions
+1 -1
View File
@@ -3550,7 +3550,7 @@ void create_screen_main_screen() {
objects.settings_device_role_dropdown = obj;
lv_obj_set_pos(obj, 0, 0);
lv_obj_set_size(obj, 150, 30);
lv_dropdown_set_options(obj, _("Client\nClient Mute\nRouter\nRepeater\nTracker\nSensor\nTAK\nClient Hidden\nLost & Found\nTAK Tracker"));
lv_dropdown_set_options(obj, _("Client\nClient Mute\nRouter\nRepeater\nTracker\nSensor\nTAK\nClient Hidden\nLost & Found\nTAK Tracker\nRouter Late"));
add_style_drop_down_style(obj);
lv_obj_set_style_align(obj, LV_ALIGN_TOP_MID, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_border_color(obj, lv_color_hex(0xffe0e0e0), LV_PART_MAIN | LV_STATE_DEFAULT);
+1
View File
@@ -62,6 +62,7 @@ class MeshtasticView : public DeviceGUI
client_hidden,
lost_and_found,
tak_tracker,
router_late,
unknown
};
+6 -1
View File
@@ -3228,6 +3228,8 @@ uint32_t TFTView_320x240::role2val(meshtastic_Config_DeviceConfig_Role role)
return 8 + offset;
case meshtastic_Config_DeviceConfig_Role_TAK_TRACKER:
return 9 + offset;
case meshtastic_Config_DeviceConfig_Role_ROUTER_LATE:
return 10 + offset;
default:
ILOG_ERROR("unsupported device role: %d", role);
return 0;
@@ -3265,6 +3267,8 @@ meshtastic_Config_DeviceConfig_Role TFTView_320x240::val2role(uint32_t val)
return meshtastic_Config_DeviceConfig_Role(meshtastic_Config_DeviceConfig_Role_LOST_AND_FOUND - offset);
case 9:
return meshtastic_Config_DeviceConfig_Role(meshtastic_Config_DeviceConfig_Role_TAK_TRACKER - offset);
case 10:
return meshtastic_Config_DeviceConfig_Role(meshtastic_Config_DeviceConfig_Role_ROUTER_LATE - offset);
default:
ILOG_WARN("unknown role value: %d", val);
}
@@ -6680,7 +6684,8 @@ void TFTView_320x240::setNodeImage(uint32_t nodeNum, eRole role, bool viaMqtt, l
break;
}
case repeater:
case router: {
case router:
case router_late: {
lv_image_set_src(img, &img_node_router_image);
break;
}
+1 -1
View File
@@ -12953,7 +12953,7 @@
}
},
"groupIndex": 0,
"options": "Client\nClient Mute\nRouter\nRepeater\nTracker\nSensor\nTAK\nClient Hidden\nLost & Found\nTAK Tracker",
"options": "Client\nClient Mute\nRouter\nRepeater\nTracker\nSensor\nTAK\nClient Hidden\nLost & Found\nTAK Tracker\nRouter Late",
"optionsType": "translated-literal",
"selected": 0,
"selectedType": "literal",