From a6c6ab0456319e0564be7f90c062187fd3bfc040 Mon Sep 17 00:00:00 2001 From: rpriven Date: Fri, 20 Feb 2026 17:19:38 -0700 Subject: [PATCH] Fix build errors: add missing includes and forward declarations Added Adafruit_NeoPixel.h and ESPAsyncWebServer.h includes that were implicitly resolved in OUI Spy but needed explicitly in standalone build. Added forward declarations for fyGPSIsFresh() and fyAddDetection() so the WiFi promiscuous callback can reference them before their definitions. Co-Authored-By: Claude Opus 4.6 --- src/main.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index fb956e2..477101c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -37,6 +37,8 @@ #include #include "esp_wifi.h" #include +#include +#include // ============================================================================ // CONFIGURATION @@ -395,6 +397,12 @@ static bool checkWiFiMACPrefix(const uint8_t* mac) { // ============================================================================ // WIFI PROMISCUOUS CALLBACK // ============================================================================ +// Forward declarations for functions called by WiFi promiscuous callback +static bool fyGPSIsFresh(); +static int fyAddDetection(const char* mac, const char* name, int rssi, + const char* method, bool isRaven = false, + const char* ravenFW = ""); + // Called by the WiFi driver for every frame on the AP's channel. // Probe requests from devices scanning (on ANY channel) are caught because // WiFi devices sweep all channels when probing. Beacons only on AP channel. @@ -589,8 +597,8 @@ static void fyProcessHardwareGPS() { // ============================================================================ static int fyAddDetection(const char* mac, const char* name, int rssi, - const char* method, bool isRaven = false, - const char* ravenFW = "") { + const char* method, bool isRaven, + const char* ravenFW) { if (!fyMutex || xSemaphoreTake(fyMutex, pdMS_TO_TICKS(100)) != pdTRUE) return -1; // Update existing by MAC