** Function: drawWebUiScreen ** Draw information on screen of WebUI. **********************************************************************/
| 272 | ** Draw information on screen of WebUI. |
| 273 | **********************************************************************/ |
| 274 | void drawWebUiScreen(bool mode_ap) { |
| 275 | drawMainBorderWithTitle("WebUI", true); |
| 276 | |
| 277 | String txt; |
| 278 | if (!mode_ap) txt = WiFi.localIP().toString(); |
| 279 | else txt = WiFi.softAPIP().toString(); |
| 280 | |
| 281 | int padX = 14; |
| 282 | int currentY = 55; |
| 283 | |
| 284 | tft.setTextColor(bruceConfig.priColor, bruceConfig.bgColor); |
| 285 | tft.setTextSize(FP); |
| 286 | |
| 287 | if (mode_ap) { |
| 288 | tft.setCursor(padX, currentY); |
| 289 | tft.print("Net: BruceNet/brucenet"); |
| 290 | currentY += LH * FP + 6; |
| 291 | } |
| 292 | |
| 293 | tft.setCursor(padX, currentY); |
| 294 | tft.print("Url: http://bruce.local"); |
| 295 | currentY += LH * FP + 6; |
| 296 | |
| 297 | tft.setCursor(padX, currentY); |
| 298 | tft.print("IP: " + txt); |
| 299 | currentY += LH * FP + 6; |
| 300 | |
| 301 | tft.setCursor(padX, currentY); |
| 302 | tft.print("Usr: " + String(bruceConfig.webUI.user)); |
| 303 | currentY += LH * FP + 6; |
| 304 | |
| 305 | tft.setCursor(padX, currentY); |
| 306 | tft.print("Pwd: " + String(bruceConfig.webUI.pwd)); |
| 307 | |
| 308 | tft.setTextColor(TFT_RED, bruceConfig.bgColor); |
| 309 | tft.setTextSize(FP); |
| 310 | tft.drawCentreString("press Esc to stop", tftWidth / 2, tftHeight - 2 * LH * FP - 5, 1); |
| 311 | |
| 312 | #if defined(HAS_TOUCH) |
| 313 | TouchFooter(); |
| 314 | #endif |
| 315 | } |
| 316 | |
| 317 | /********************************************************************** |
| 318 | ** Function: color565ToWebHex |
no test coverage detected