| 251 | } |
| 252 | |
| 253 | void 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 | |
| 277 | void View::updateEnableOnBootToggle() { |
| 278 | if (enable_on_boot_switch != nullptr) { |
nothing calls this directly
no test coverage detected