Icon if AP is enabled

pull/39/head
Farkas Szilárd 2021-06-06 16:28:22 +02:00
rodzic ac29472849
commit bbe864d605
3 zmienionych plików z 11 dodań i 0 usunięć

Wyświetl plik

@ -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);

Wyświetl plik

@ -8,6 +8,7 @@ tcpip_adapter_ip_info_t WIFI_IP = { 0, 0, 0 }; // WIFI local IP address, mask a
WIFI_State_t WIFI_State;
bool WIFI_isConnected(void) { return WIFI_IP.ip.addr!=0; } // return "connected" status when IP from DHCP is there
bool WIFI_isAP(void) { return WIFI_Config.ap.ssid_len!=0; } // return if AP mode enabled
static esp_err_t WIFI_event_handler(void *ctx, system_event_t *event)
{

Wyświetl plik

@ -19,6 +19,7 @@ typedef union
extern WIFI_State_t WIFI_State;
bool WIFI_isConnected(void);
bool WIFI_isAP(void);
esp_err_t WIFI_Init(void);
esp_err_t WIFI_setPowerSave(bool ON);
esp_err_t WIFI_Start(void);