diff --git a/main/disp.cpp b/main/disp.cpp index bfbdad7..d26e31c 100644 --- a/main/disp.cpp +++ b/main/disp.cpp @@ -42,6 +42,7 @@ void vTaskDISP(void* pvParameters) OLED_DrawLogo(&U8G2_OLED); // draw logo u8g2_SendBuffer(&U8G2_OLED); vTaskDelay(2000); // allow 2sec for the user to see the logo + DISP_Page = Parameters.InitialPage; #endif #if defined(WITH_ST7789) || defined(WITH_ILI9341) // LCD_Start(); diff --git a/main/disp_oled.cpp b/main/disp_oled.cpp index fbfd83c..a11e6cf 100644 --- a/main/disp_oled.cpp +++ b/main/disp_oled.cpp @@ -23,6 +23,10 @@ #include "wifi.h" #endif +#ifdef WITH_AP +#include "wifi.h" +#endif + #ifdef WITH_BT_SPP #include "bt.h" #endif @@ -592,6 +596,11 @@ void OLED_DrawStatusBar(u8g2_t *OLED, GPS_Position *GPS) // status bar on top if(WIFI_isConnected()) { u8g2_SetFont(OLED, u8g2_font_open_iconic_all_1x_t); u8g2_DrawGlyph(OLED, 43, 11, 0x119); } // 0x50 +#endif +#ifdef WITH_AP + if(WIFI_isAP()) + { u8g2_SetFont(OLED, u8g2_font_open_iconic_all_1x_t); + u8g2_DrawGlyph(OLED, 43, 11, 0xF8); } // 0x50 #endif // u8g2_SetFont(OLED, u8g2_font_5x7_tr); // u8g2_SetFont(OLED, u8g2_font_5x8_tr); @@ -744,10 +753,10 @@ void OLED_DrawAltitudeAndSpeed(u8g2_t *OLED, GPS_Position *GPS) Line[Len]=0; u8g2_SetFont(OLED, u8g2_font_fub20_tr); uint8_t Altitude_width = u8g2_GetStrWidth(OLED, Line); - u8g2_DrawStr(OLED, 54-Altitude_width, 40, Line); + u8g2_DrawStr(OLED, 62-Altitude_width, 40, Line); u8g2_SetFont(OLED, u8g2_font_9x15_tr); - u8g2_DrawStr(OLED, 58, 40, "m"); + u8g2_DrawStr(OLED, 66, 40, "m"); u8g2_SetFont(OLED, u8g2_font_fub17_tr); if(GPS && GPS->isValid()) @@ -757,10 +766,10 @@ void OLED_DrawAltitudeAndSpeed(u8g2_t *OLED, GPS_Position *GPS) Len=Format_String(Line, "---"); Line[Len]=0; uint8_t Track_width = u8g2_GetStrWidth(OLED, Line); - u8g2_DrawStr(OLED, 116-Track_width, 40, Line); + u8g2_DrawStr(OLED, 118-Track_width, 40, Line); u8g2_SetFont(OLED, u8g2_font_6x12_tr); - u8g2_DrawStr(OLED, 120, 28, "o"); + u8g2_DrawStr(OLED, 122, 28, "o"); if(GPS && (GPS->hasBaro || GPS->isValid())) // if GPS has lock or just the pressure data { int16_t vario_value = GPS->ClimbRate; // [0.1m/s] climb rate diff --git a/main/http.cpp b/main/http.cpp index 8a6f38e..5ee7fc0 100644 --- a/main/http.cpp +++ b/main/http.cpp @@ -237,6 +237,13 @@ static void ParmForm_Other(httpd_req_t *Req) // produce HTML form for aircraft httpd_resp_sendstr_chunk(Req, "\">"); End_Control_Row(Req); + Begin_Control_Row(Req, "Initial Page"); + httpd_resp_sendstr_chunk(Req, ""); + End_Control_Row(Req); + httpd_resp_sendstr_chunk(Req, "
\n"); httpd_resp_sendstr_chunk(Req, "\n"); } @@ -608,6 +615,35 @@ static void Table_Batt(httpd_req_t *Req) httpd_resp_sendstr_chunk(Req, "\n"); } +// ------------------------------------------------------------------------------------------------------------- +#ifdef WITH_SPIFFS +static void Table_SPIFFS(httpd_req_t *Req) +{ char Line[128]; int Len; + + httpd_resp_sendstr_chunk(Req, "Free | "); + Len+=Format_UnsDec(Line+Len, (Total-Used)/1024); + Len+=Format_String(Line+Len, " kB |
Used | "); + Len+=Format_UnsDec(Line+Len, Used/1024); + Len+=Format_String(Line+Len, " kB |
Total | "); + Len+=Format_UnsDec(Line+Len, Total/1024); + Len+=Format_String(Line+Len, " kB |