updated libraries, fixed ESP-NOW send data function to work with the new library

This commit is contained in:
2025-09-09 01:09:15 +02:00
parent 79c734bd34
commit 649cbe63b1
3 changed files with 5 additions and 2 deletions

View File

@@ -1,6 +1,7 @@
// ROFLS+ Arena Controller // ROFLS+ Arena Controller
#include <WiFi.h> #include <WiFi.h>
#include <esp_wifi.h> // Required for wifi_tx_info_t
#include <esp_now.h> // automatically installed for ESP32 boards, I think? #include <esp_now.h> // automatically installed for ESP32 boards, I think?
#include <Preferences.h> // automatically installed for ESP32 boards #include <Preferences.h> // automatically installed for ESP32 boards
#include <avdweb_Switch.h> // https://github.com/avdwebLibraries/avdweb_Switch #include <avdweb_Switch.h> // https://github.com/avdwebLibraries/avdweb_Switch
@@ -122,7 +123,7 @@ esp_now_peer_info_t peerInfo;
// callback when data is sent // callback when data is sent
void OnDataSent(const uint8_t *mac_addr, esp_now_send_status_t status) { void OnDataSent(const wifi_tx_info_t *tx_info, esp_now_send_status_t status) {
Serial.print("\r\nLast Packet Send Status:\t"); Serial.print("\r\nLast Packet Send Status:\t");
Serial.println(status == ESP_NOW_SEND_SUCCESS ? "Delivery Success" : "Delivery Fail"); Serial.println(status == ESP_NOW_SEND_SUCCESS ? "Delivery Success" : "Delivery Fail");
} }

View File

@@ -4,6 +4,7 @@
// 48:27:E2:50:86:84 // 48:27:E2:50:86:84
#include <WiFi.h> #include <WiFi.h>
#include <esp_wifi.h> // Required for wifi_tx_info_t
#include <esp_now.h> // automatically installed for ESP32 boards, I think? #include <esp_now.h> // automatically installed for ESP32 boards, I think?
#include <Preferences.h> // automatically installed for ESP32 boards #include <Preferences.h> // automatically installed for ESP32 boards
#include <FastLED.h> // https://fastled.io/ #include <FastLED.h> // https://fastled.io/

View File

@@ -1,6 +1,7 @@
// ROFLS+ Referee Remote // ROFLS+ Referee Remote
#include <WiFi.h> #include <WiFi.h>
#include <esp_wifi.h> // Required for wifi_tx_info_t
#include <esp_now.h> // automatically installed for ESP32 boards, I think? #include <esp_now.h> // automatically installed for ESP32 boards, I think?
#include <Preferences.h> // automatically installed for ESP32 boards #include <Preferences.h> // automatically installed for ESP32 boards
#include <avdweb_Switch.h> // https://github.com/avdwebLibraries/avdweb_Switch #include <avdweb_Switch.h> // https://github.com/avdwebLibraries/avdweb_Switch
@@ -79,7 +80,7 @@ esp_now_peer_info_t peerInfo;
Preferences preferences; Preferences preferences;
// callback when data is sent // callback when data is sent
void OnDataSent(const uint8_t *mac_addr, esp_now_send_status_t status) { void OnDataSent(const wifi_tx_info_t *tx_info, esp_now_send_status_t status) {
Serial.print("\r\nLast Packet Send Status:\t"); Serial.print("\r\nLast Packet Send Status:\t");
Serial.println(status == ESP_NOW_SEND_SUCCESS ? "Delivery Success" : "Delivery Fail"); Serial.println(status == ESP_NOW_SEND_SUCCESS ? "Delivery Success" : "Delivery Fail");
} }