mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-03 17:59:27 +02:00
Improvement: Replace use of deprecated functions and improve compilation warnings (#817)
* Change deprecated Send_P to send function * Fix compilation warnings in Wifi files * Change warnings into compilation errors * Add -Wall -Wextra -Wpedantic -Werror to github actions
This commit is contained in:
parent
854e9093fd
commit
275eaa9be8
8 changed files with 24 additions and 24 deletions
|
@ -108,7 +108,7 @@ void wifi_monitor() {
|
|||
}
|
||||
|
||||
// Function to force a full reconnect to Wi-Fi
|
||||
static void FullReconnectToWiFi() {
|
||||
void FullReconnectToWiFi() {
|
||||
|
||||
// Increase the current reconnect interval if it's not at the maximum
|
||||
if (current_full_reconnect_interval + STEP_WIFI_FULL_RECONNECT_INTERVAL <= MAX_WIFI_FULL_RECONNECT_INTERVAL) {
|
||||
|
@ -120,7 +120,7 @@ static void FullReconnectToWiFi() {
|
|||
}
|
||||
|
||||
// Function to handle Wi-Fi connection
|
||||
static void connectToWiFi() {
|
||||
void connectToWiFi() {
|
||||
if (WiFi.status() != WL_CONNECTED) {
|
||||
lastReconnectAttempt = millis(); // Reset the reconnect attempt timer
|
||||
#ifdef DEBUG_LOG
|
||||
|
@ -135,7 +135,7 @@ static void connectToWiFi() {
|
|||
}
|
||||
|
||||
// Event handler for successful Wi-Fi connection
|
||||
static void onWifiConnect(WiFiEvent_t event, WiFiEventInfo_t info) {
|
||||
void onWifiConnect(WiFiEvent_t event, WiFiEventInfo_t info) {
|
||||
clear_event(EVENT_WIFI_DISCONNECT);
|
||||
set_event(EVENT_WIFI_CONNECT, 0);
|
||||
connected_once = true;
|
||||
|
@ -153,7 +153,7 @@ static void onWifiConnect(WiFiEvent_t event, WiFiEventInfo_t info) {
|
|||
}
|
||||
|
||||
// Event handler for Wi-Fi Got IP
|
||||
static void onWifiGotIP(WiFiEvent_t event, WiFiEventInfo_t info) {
|
||||
void onWifiGotIP(WiFiEvent_t event, WiFiEventInfo_t info) {
|
||||
//clear disconnects events if we got a IP
|
||||
clear_event(EVENT_WIFI_DISCONNECT);
|
||||
#ifdef DEBUG_LOG
|
||||
|
@ -164,7 +164,7 @@ static void onWifiGotIP(WiFiEvent_t event, WiFiEventInfo_t info) {
|
|||
}
|
||||
|
||||
// Event handler for Wi-Fi disconnection
|
||||
static void onWifiDisconnect(WiFiEvent_t event, WiFiEventInfo_t info) {
|
||||
void onWifiDisconnect(WiFiEvent_t event, WiFiEventInfo_t info) {
|
||||
if (connected_once)
|
||||
set_event(EVENT_WIFI_DISCONNECT, 0);
|
||||
#ifdef DEBUG_LOG
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue