Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/module_aat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -673,4 +675,4 @@ void AatModule::Loop(uint32_t now)

CrsfModuleBase::Loop(now);
}
#endif /* AAT_BACKPACK */
#endif /* AAT_BACKPACK */
6 changes: 5 additions & 1 deletion src/module_aat.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@
#include "devWIFI.h"

#if defined(PIN_SERVO_AZIM) || defined(PIN_SERVO_ELEV)
#if defined(ESP32)
#include "ESP32Servo.h"
#else
#include <Servo.h>
#endif
#endif

#if defined(PIN_OLED_SDA)
#include <Wire.h>
Expand Down Expand Up @@ -124,4 +128,4 @@ class AatModule : public CrsfModuleBase

extern AatModule vrxModule;

#endif /* AAT_BACKPACK */
#endif /* AAT_BACKPACK */
23 changes: 23 additions & 0 deletions targets/aat.ini
Original file line number Diff line number Diff line change
@@ -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} -<Tx_main.cpp> -<rapidfire.*> -<rx5808.*> -<steadyview.*> -<Timer_main.cpp> -<mfd_crossbow.*>



[env:AAT_ESP_Backpack_via_UART]
extends = env_common_esp12e
Expand Down