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

Method updateBtToggle

Tactility/Source/app/btmanage/View.cpp:112–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

110// region Secondary updates
111
112void 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
134void View::updateEnableOnBootToggle() {
135 if (enable_on_boot_switch != nullptr) {

Callers

nothing calls this directly

Calls 1

getRadioStateMethod · 0.45

Tested by

no test coverage detected