Bug fix - incorrect wifi mode upon wifi screen entry.
Tidied alignment of OTA & CFG/AP against Wifi icon
This commit is contained in:
parent
a8744fdf22
commit
e6b285c00c
|
@ -132,9 +132,9 @@ CScreenHeader::showWifiIcon()
|
|||
if(isWifiConnected() || isWifiAP()) {
|
||||
_display.drawBitmap(X_WIFI_ICON, Y_WIFI_ICON, wifiIcon, W_WIFI_ICON, H_WIFI_ICON, WHITE);
|
||||
if(isWifiButton()) {
|
||||
_display.fillRect(X_WIFI_ICON + 8, Y_WIFI_ICON + 5, 15, 7, BLACK);
|
||||
_display.fillRect(X_WIFI_ICON + 11, Y_WIFI_ICON + 5, 15, 7, BLACK);
|
||||
CTransientFont AF(_display, &MINIFONT); // temporarily use a mini font
|
||||
_display.setCursor(X_WIFI_ICON+9, Y_WIFI_ICON+6);
|
||||
_display.setCursor(X_WIFI_ICON+12, Y_WIFI_ICON+6);
|
||||
switch(isWifiButton()) {
|
||||
case 1: _display.print("CFG"); break;
|
||||
case 2: _display.print("HTR"); break;
|
||||
|
@ -142,16 +142,16 @@ CScreenHeader::showWifiIcon()
|
|||
}
|
||||
}
|
||||
else if(isWifiConfigPortal()) {
|
||||
_display.fillRect(X_WIFI_ICON + 8, Y_WIFI_ICON + 5, 15, 7, BLACK);
|
||||
_display.fillRect(X_WIFI_ICON + 11, Y_WIFI_ICON + 5, 15, 7, BLACK);
|
||||
CTransientFont AF(_display, &MINIFONT); // temporarily use a mini font
|
||||
_display.setCursor(X_WIFI_ICON+9, Y_WIFI_ICON+6);
|
||||
_display.setCursor(X_WIFI_ICON+12, Y_WIFI_ICON+6);
|
||||
// _display.print("PTL");
|
||||
_display.print("CFG");
|
||||
}
|
||||
else if(isWifiAP()) {
|
||||
_display.fillRect(X_WIFI_ICON + 8, Y_WIFI_ICON + 5, 10, 7, BLACK);
|
||||
_display.fillRect(X_WIFI_ICON + 11, Y_WIFI_ICON + 5, 10, 7, BLACK);
|
||||
CTransientFont AF(_display, &MINIFONT); // temporarily use a mini font
|
||||
_display.setCursor(X_WIFI_ICON+9, Y_WIFI_ICON+6);
|
||||
_display.setCursor(X_WIFI_ICON+12, Y_WIFI_ICON+6);
|
||||
_display.print("AP");
|
||||
}
|
||||
if(NVstore.getOTAEnabled()) {
|
||||
|
|
|
@ -63,21 +63,21 @@ CWiFiScreen::_initUI()
|
|||
if(NVstore.getWifiEnabled()) {
|
||||
if(isWifiAP()) {
|
||||
if(isWifiConfigPortal()) {
|
||||
_colSel = 0; // " WiFi: CFG AP only "
|
||||
_colLimit = LIMIT_LEFT; // left most selection
|
||||
_colSel = 1; // " WiFi: CFG AP only "
|
||||
_colLimit = LIMIT_AWAY; // inner selection
|
||||
}
|
||||
else {
|
||||
_colSel = 1; // " WiFi: AP only ";
|
||||
_colSel = 2; // " WiFi: AP only ";
|
||||
_colLimit = LIMIT_RIGHT; // right most selection
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(isWifiConfigPortal()) {
|
||||
_colSel = 2; // " WiFi: CFG STA+AP "
|
||||
_colSel = 3; // " WiFi: CFG STA+AP "
|
||||
_colLimit = LIMIT_AWAY; // away from menu limits
|
||||
}
|
||||
else {
|
||||
_colSel = 3; // " WiFi: STA+AP ";
|
||||
_colSel = 4; // " WiFi: STA+AP ";
|
||||
_colLimit = LIMIT_RIGHT; // right most selection
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue