Fri, 08 Nov 2019 22:40:15 +0100
Increaded stacksize for the user process. Implemented the network update using the proven brewboard code. Reverted the lock release and display sendbuffer lines to the previous code. The networks status screen uses the wifi lock.
/** * @file task_wifi.h * @brief WiFi task. Connect to the known AP with the strongest signal. */ #ifndef _TASK_WIFI_H #define _TASK_WIFI_H /** * @brief Defines the maximum number of access points that can be scanned. */ #define MAX_AP_NUM 5 /** * @brief Structure containing the information of the driver task. */ typedef struct { bool STA_connected; ///< Connected to AP as station. bool STA_online; ///< Connected and online. char STA_ssid[33]; ///< Connected to this SSID. int8_t STA_rssi; ///< Signal strength. char STA_ip[17]; ///< IP address. char STA_nm[17]; ///< IP netmask. char STA_gw[17]; ///< IP gateway. } WIFI_State; /** * @brief System request for WiFi connection. * @param state Boolean state request. */ void requestWiFi_system(bool state); /** * @brief User request for WiFi connection. * @param state Boolean state request. */ void requestWiFi_user(bool state); /** * @brief Test if Wifi is ready and connected * @return Return true is connected and we have an IP address. */ bool ready_WiFi(void); /** * @brief Main task for the wifi_manager */ void task_wifi(void *); #endif