fix bluetooth toggle on ui tiny
This commit is contained in:
1 file changed
+5
-5
@@ -240,7 +240,7 @@ public:
|
|||||||
} else if (_page == HomePage::BLUETOOTH) {
|
} else if (_page == HomePage::BLUETOOTH) {
|
||||||
display.setColor(UIColor::corp_blue);
|
display.setColor(UIColor::corp_blue);
|
||||||
display.drawXbm((display.width() - 32) / 2, 8,
|
display.drawXbm((display.width() - 32) / 2, 8,
|
||||||
_task->isSerialEnabled() ? bluetooth_on : bluetooth_off,
|
_task->isBluetoothEnabled() ? bluetooth_on : bluetooth_off,
|
||||||
32, 32);
|
32, 32);
|
||||||
display.setTextSize(1);
|
display.setTextSize(1);
|
||||||
// display.drawTextCentered(display.width() / 2, 40 - 11, "toggle: " PRESS_LABEL);
|
// display.drawTextCentered(display.width() / 2, 40 - 11, "toggle: " PRESS_LABEL);
|
||||||
@@ -391,10 +391,10 @@ public:
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (c == KEY_ENTER && _page == HomePage::BLUETOOTH) {
|
if (c == KEY_ENTER && _page == HomePage::BLUETOOTH) {
|
||||||
if (_task->isSerialEnabled()) { // toggle Bluetooth on/off
|
if (_task->isBluetoothEnabled()) { // toggle Bluetooth on/off
|
||||||
_task->disableSerial();
|
_task->disableBluetooth();
|
||||||
} else {
|
} else {
|
||||||
_task->enableSerial();
|
_task->enableBluetooth();
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -677,7 +677,7 @@ void UITask::loop() {
|
|||||||
_cached_batt_mv,
|
_cached_batt_mv,
|
||||||
isBuzzerQuiet(),
|
isBuzzerQuiet(),
|
||||||
getGPSState(),
|
getGPSState(),
|
||||||
isSerialEnabled());
|
isBluetoothEnabled());
|
||||||
|
|
||||||
bool status_dirty = _statusBar.needsRedraw();
|
bool status_dirty = _statusBar.needsRedraw();
|
||||||
bool content_dirty = (millis() >= _next_refresh && curr);
|
bool content_dirty = (millis() >= _next_refresh && curr);
|
||||||
|
|||||||
Reference in New Issue
Block a user