kopia lustrzana https://github.com/pjalocha/esp32-ogn-tracker
Icon if AP is enabled
rodzic
ac29472849
commit
bbe864d605
|
@ -23,6 +23,10 @@
|
||||||
#include "wifi.h"
|
#include "wifi.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef WITH_AP
|
||||||
|
#include "wifi.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef WITH_BT_SPP
|
#ifdef WITH_BT_SPP
|
||||||
#include "bt.h"
|
#include "bt.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -592,6 +596,11 @@ void OLED_DrawStatusBar(u8g2_t *OLED, GPS_Position *GPS) // status bar on top
|
||||||
if(WIFI_isConnected())
|
if(WIFI_isConnected())
|
||||||
{ u8g2_SetFont(OLED, u8g2_font_open_iconic_all_1x_t);
|
{ u8g2_SetFont(OLED, u8g2_font_open_iconic_all_1x_t);
|
||||||
u8g2_DrawGlyph(OLED, 43, 11, 0x119); } // 0x50
|
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
|
#endif
|
||||||
// u8g2_SetFont(OLED, u8g2_font_5x7_tr);
|
// u8g2_SetFont(OLED, u8g2_font_5x7_tr);
|
||||||
// u8g2_SetFont(OLED, u8g2_font_5x8_tr);
|
// u8g2_SetFont(OLED, u8g2_font_5x8_tr);
|
||||||
|
|
|
@ -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;
|
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_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)
|
static esp_err_t WIFI_event_handler(void *ctx, system_event_t *event)
|
||||||
{
|
{
|
||||||
|
|
|
@ -19,6 +19,7 @@ typedef union
|
||||||
extern WIFI_State_t WIFI_State;
|
extern WIFI_State_t WIFI_State;
|
||||||
|
|
||||||
bool WIFI_isConnected(void);
|
bool WIFI_isConnected(void);
|
||||||
|
bool WIFI_isAP(void);
|
||||||
esp_err_t WIFI_Init(void);
|
esp_err_t WIFI_Init(void);
|
||||||
esp_err_t WIFI_setPowerSave(bool ON);
|
esp_err_t WIFI_setPowerSave(bool ON);
|
||||||
esp_err_t WIFI_Start(void);
|
esp_err_t WIFI_Start(void);
|
||||||
|
|
Ładowanie…
Reference in New Issue