MCPcopy Create free account
hub / github.com/TactilityProject/Tactility / updateWifiToggle

Method updateWifiToggle

Tactility/Source/app/wifimanage/View.cpp:253–275  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

251}
252
253void View::updateWifiToggle() {
254 lv_obj_clear_state(enable_switch, LV_STATE_ANY);
255 switch (state->getRadioState()) {
256 using enum service::wifi::RadioState;
257 case On:
258 case ConnectionPending:
259 case ConnectionActive:
260 lv_obj_add_state(enable_switch, LV_STATE_CHECKED);
261 break;
262 case OnPending:
263 lv_obj_add_state(enable_switch, LV_STATE_CHECKED);
264 lv_obj_add_state(enable_switch, LV_STATE_DISABLED);
265 break;
266 case Off:
267 lv_obj_remove_state(enable_switch, LV_STATE_CHECKED);
268 lv_obj_remove_state(enable_switch, LV_STATE_DISABLED);
269 break;
270 case OffPending:
271 lv_obj_remove_state(enable_switch, LV_STATE_CHECKED);
272 lv_obj_add_state(enable_switch, LV_STATE_DISABLED);
273 break;
274 }
275}
276
277void View::updateEnableOnBootToggle() {
278 if (enable_on_boot_switch != nullptr) {

Callers

nothing calls this directly

Calls 1

getRadioStateMethod · 0.45

Tested by

no test coverage detected