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()) {
|
if(isWifiConnected() || isWifiAP()) {
|
||||||
_display.drawBitmap(X_WIFI_ICON, Y_WIFI_ICON, wifiIcon, W_WIFI_ICON, H_WIFI_ICON, WHITE);
|
_display.drawBitmap(X_WIFI_ICON, Y_WIFI_ICON, wifiIcon, W_WIFI_ICON, H_WIFI_ICON, WHITE);
|
||||||
if(isWifiButton()) {
|
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
|
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()) {
|
switch(isWifiButton()) {
|
||||||
case 1: _display.print("CFG"); break;
|
case 1: _display.print("CFG"); break;
|
||||||
case 2: _display.print("HTR"); break;
|
case 2: _display.print("HTR"); break;
|
||||||
|
@ -142,16 +142,16 @@ CScreenHeader::showWifiIcon()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(isWifiConfigPortal()) {
|
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
|
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("PTL");
|
||||||
_display.print("CFG");
|
_display.print("CFG");
|
||||||
}
|
}
|
||||||
else if(isWifiAP()) {
|
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
|
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");
|
_display.print("AP");
|
||||||
}
|
}
|
||||||
if(NVstore.getOTAEnabled()) {
|
if(NVstore.getOTAEnabled()) {
|
||||||
|
|
|
@ -63,21 +63,21 @@ CWiFiScreen::_initUI()
|
||||||
if(NVstore.getWifiEnabled()) {
|
if(NVstore.getWifiEnabled()) {
|
||||||
if(isWifiAP()) {
|
if(isWifiAP()) {
|
||||||
if(isWifiConfigPortal()) {
|
if(isWifiConfigPortal()) {
|
||||||
_colSel = 0; // " WiFi: CFG AP only "
|
_colSel = 1; // " WiFi: CFG AP only "
|
||||||
_colLimit = LIMIT_LEFT; // left most selection
|
_colLimit = LIMIT_AWAY; // inner selection
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
_colSel = 1; // " WiFi: AP only ";
|
_colSel = 2; // " WiFi: AP only ";
|
||||||
_colLimit = LIMIT_RIGHT; // right most selection
|
_colLimit = LIMIT_RIGHT; // right most selection
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if(isWifiConfigPortal()) {
|
if(isWifiConfigPortal()) {
|
||||||
_colSel = 2; // " WiFi: CFG STA+AP "
|
_colSel = 3; // " WiFi: CFG STA+AP "
|
||||||
_colLimit = LIMIT_AWAY; // away from menu limits
|
_colLimit = LIMIT_AWAY; // away from menu limits
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
_colSel = 3; // " WiFi: STA+AP ";
|
_colSel = 4; // " WiFi: STA+AP ";
|
||||||
_colLimit = LIMIT_RIGHT; // right most selection
|
_colLimit = LIMIT_RIGHT; // right most selection
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue