Outgoing bind frame

This commit is contained in:
Pawel Spychalski
2018-05-23 15:21:11 +02:00
parent 831c97b219
commit 95ecb7c4f9
5 changed files with 35 additions and 2 deletions

View File

@@ -22,6 +22,13 @@ void TxOled::loop() {
//Second button has notthing to do over here
break;
case TX_PAGE_BIND:
if (button1.getState() == TACTILE_STATE_LONG_PRESS) {
platformNode.isBindMode = !platformNode.isBindMode;
update = true;
}
break;
case TX_PAGE_STATS:
//Second button refreshes this page
if (button1.getState() == TACTILE_STATE_SHORT_PRESS) {
@@ -93,7 +100,12 @@ void TxOled::renderPageBind() {
_display.clear();
_display.draw1x2String(0, 0, "Bind");
snprintf(buf, OLED_COL_COUNT, "Bind?");
if (platformNode.isBindMode) {
snprintf(buf, OLED_COL_COUNT, "Binding!!");
} else {
snprintf(buf, OLED_COL_COUNT, "Bind?");
}
_display.draw1x2String(0, 4, buf);
}