Fix analog_btn and UITask.cpp ESP32-S3 compilation errors

This commit is contained in:
Piero Andreini 2026-03-31 08:52:00 +02:00
parent 0dabed3c40
commit add48e5cbe
6 changed files with 12 additions and 6 deletions

View file

@ -34,7 +34,7 @@
#define PIN_GPS_EN -1
// Analog button
#define PIN_USER_BTN_ANA 7
// #define PIN_USER_BTN_ANA 7
// Include headers AFTER pin definitions so ESP32Board::sleep() can use P_LORA_DIO_1
#include <Wire.h>

View file

@ -34,7 +34,7 @@
#define PIN_GPS_EN -1
// Analog button
#define PIN_USER_BTN_ANA 7
// #define PIN_USER_BTN_ANA 7
// Include headers AFTER pin definitions so ESP32Board::sleep() can use P_LORA_DIO_0
#include <Wire.h>

View file

@ -9,6 +9,7 @@ TEthEliteBoard board;
#endif
MomentaryButton user_btn(PIN_USER_BTN_ANA, 1000, true);
MomentaryButton analog_btn(PIN_USER_BTN_ANA, 1000, true); // alias for UITask analog button support
static SPIClass spi;
RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY, spi);

View file

@ -1,7 +1,5 @@
#pragma once
#define HAS_ETHERNET 1
#define RADIOLIB_STATIC_ONLY 1
#include <RadioLib.h>
#include <helpers/radiolib/RadioLibWrappers.h>
@ -13,6 +11,10 @@
extern MomentaryButton user_btn;
#ifdef PIN_USER_BTN_ANA
extern MomentaryButton analog_btn;
#endif
#ifdef DISPLAY_CLASS
#include <helpers/ui/SH1106Display.h>
extern DISPLAY_CLASS display;

View file

@ -9,6 +9,7 @@ TEthEliteBoard board;
#endif
MomentaryButton user_btn(PIN_USER_BTN_ANA, 1000, true);
MomentaryButton analog_btn(PIN_USER_BTN_ANA, 1000, true); // alias for UITask analog button support
static SPIClass spi;
RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_0, P_LORA_RESET, P_LORA_DIO_1, spi);

View file

@ -1,7 +1,5 @@
#pragma once
#define HAS_ETHERNET 1
#define RADIOLIB_STATIC_ONLY 1
#include <RadioLib.h>
#include <helpers/radiolib/RadioLibWrappers.h>
@ -13,6 +11,10 @@
extern MomentaryButton user_btn;
#ifdef PIN_USER_BTN_ANA
extern MomentaryButton analog_btn;
#endif
#ifdef DISPLAY_CLASS
#include <helpers/ui/SH1106Display.h>
extern DISPLAY_CLASS display;