From 2a4614122a5d19bde8de0c216f9a61524d557e4c Mon Sep 17 00:00:00 2001 From: Pelado Mat Date: Fri, 19 Jun 2026 16:17:44 -0400 Subject: [PATCH 1/3] Add an esp32 target to use the DIY ATT target --- src/module_aat.cpp | 8 +++++--- src/module_aat.h | 6 +++++- targets/aat.ini | 23 +++++++++++++++++++++++ 3 files changed, 33 insertions(+), 4 deletions(-) diff --git a/src/module_aat.cpp b/src/module_aat.cpp index 8970e521..ba679b01 100644 --- a/src/module_aat.cpp +++ b/src/module_aat.cpp @@ -115,11 +115,13 @@ void AatModule::Init() #endif _servoPos[IDX_AZIM] = (config.GetAatServoLow(IDX_AZIM) + config.GetAatServoHigh(IDX_AZIM)) / 2; #if defined(PIN_SERVO_AZIM) - _servo_Azim.attach(PIN_SERVO_AZIM, 500, 2500, _servoPos[IDX_AZIM]); + _servo_Azim.attach(PIN_SERVO_AZIM, 500, 2500); + _servo_Azim.write(_servoPos[IDX_AZIM]); #endif _servoPos[IDX_ELEV] = (config.GetAatServoLow(IDX_ELEV) + config.GetAatServoHigh(IDX_ELEV)) / 2; #if defined(PIN_SERVO_ELEV) - _servo_Elev.attach(PIN_SERVO_ELEV, 500, 2500, _servoPos[IDX_ELEV]); + _servo_Elev.attach(PIN_SERVO_ELEV, 500, 2500); + _servo_Elev.write(_servoPos[IDX_ELEV]); #endif #if defined(PIN_OLED_SDA) displayInit(); @@ -673,4 +675,4 @@ void AatModule::Loop(uint32_t now) CrsfModuleBase::Loop(now); } -#endif /* AAT_BACKPACK */ \ No newline at end of file +#endif /* AAT_BACKPACK */ diff --git a/src/module_aat.h b/src/module_aat.h index 26d0716a..aa68ff58 100644 --- a/src/module_aat.h +++ b/src/module_aat.h @@ -7,8 +7,12 @@ #include "devWIFI.h" #if defined(PIN_SERVO_AZIM) || defined(PIN_SERVO_ELEV) +#if defined(ESP32) +#include "ESP32Servo.h" +#else #include #endif +#endif #if defined(PIN_OLED_SDA) #include @@ -124,4 +128,4 @@ class AatModule : public CrsfModuleBase extern AatModule vrxModule; -#endif /* AAT_BACKPACK */ \ No newline at end of file +#endif /* AAT_BACKPACK */ diff --git a/targets/aat.ini b/targets/aat.ini index f272b8cc..3c7e8e6c 100644 --- a/targets/aat.ini +++ b/targets/aat.ini @@ -1,6 +1,29 @@ # ******************************** # AAT VRX backpack -- Automatic antenna tracking # ******************************** +[env:AAT_ESP32_Backpack_via_UART] +extends = env_common_esp32 +build_flags = + ${common_env_data.build_flags} + ${env_common_esp32.build_flags} + -D TARGET_VRX_BACKPACK + -D AAT_BACKPACK + -D SSD1306_NO_SPLASH + -D PIN_BUTTON=25 + -D PIN_LED=26 + -D LED_INVERTED + -D PIN_SERVO_AZIM=27 + -D PIN_SERVO_ELEV=14 + -D PIN_OLED_SCL=21 + -D PIN_OLED_SDA=22 + -D DEBUG_LOG +lib_deps = + ${env.lib_deps} + adafruit/Adafruit SSD1306 @ 2.5.9 + madhephaestus/ESP32Servo +build_src_filter = ${common_env_data.build_src_filter} - - - - - - + + [env:AAT_ESP_Backpack_via_UART] extends = env_common_esp12e From 196048ba5f6af21ac3140e356ba8a773843703c7 Mon Sep 17 00:00:00 2001 From: Paul Kendall Date: Mon, 29 Jun 2026 09:11:35 +1200 Subject: [PATCH 2/3] Fixes for latest master --- targets/aat.ini | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/targets/aat.ini b/targets/aat.ini index 3c7e8e6c..d8070218 100644 --- a/targets/aat.ini +++ b/targets/aat.ini @@ -21,9 +21,7 @@ lib_deps = ${env.lib_deps} adafruit/Adafruit SSD1306 @ 2.5.9 madhephaestus/ESP32Servo -build_src_filter = ${common_env_data.build_src_filter} - - - - - - - - +build_src_filter = ${common_env_data.build_src_filter} - - - - - - - [env:AAT_ESP_Backpack_via_UART] extends = env_common_esp12e From 7385739d2e87e0ce8a4fe85de4baaf77645e1cc9 Mon Sep 17 00:00:00 2001 From: Paul Kendall Date: Mon, 29 Jun 2026 09:16:20 +1200 Subject: [PATCH 3/3] Add to supported hardware for flashers --- hardware/targets.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hardware/targets.json b/hardware/targets.json index 39eece79..90cc91ea 100644 --- a/hardware/targets.json +++ b/hardware/targets.json @@ -658,6 +658,12 @@ "firmware": "AAT_ESP_Backpack", "upload_methods": ["uart", "wifi"], "platform": "esp8285" + }, + "esp32": { + "product_name": "ESP32 DevKit", + "firmware": "AAT_ESP32_Backpack", + "upload_methods": ["uart", "wifi"], + "platform": "esp32" } } },