| 110 | // region Secondary updates |
| 111 | |
| 112 | void View::updateBtToggle() { |
| 113 | lv_obj_clear_state(enable_switch, LV_STATE_ANY); |
| 114 | switch (state->getRadioState()) { |
| 115 | using enum bluetooth::RadioState; |
| 116 | case On: |
| 117 | lv_obj_add_state(enable_switch, LV_STATE_CHECKED); |
| 118 | break; |
| 119 | case OnPending: |
| 120 | lv_obj_add_state(enable_switch, LV_STATE_CHECKED); |
| 121 | lv_obj_add_state(enable_switch, LV_STATE_DISABLED); |
| 122 | break; |
| 123 | case Off: |
| 124 | lv_obj_remove_state(enable_switch, LV_STATE_CHECKED); |
| 125 | lv_obj_remove_state(enable_switch, LV_STATE_DISABLED); |
| 126 | break; |
| 127 | case OffPending: |
| 128 | lv_obj_remove_state(enable_switch, LV_STATE_CHECKED); |
| 129 | lv_obj_add_state(enable_switch, LV_STATE_DISABLED); |
| 130 | break; |
| 131 | } |
| 132 | } |
| 133 | |
| 134 | void View::updateEnableOnBootToggle() { |
| 135 | if (enable_on_boot_switch != nullptr) { |
nothing calls this directly
no test coverage detected