Configuration Options - zs6buj/AntTracker GitHub Wiki

Before you build/compile the tracker firmware, you should edit config.h according to your circumstances and equipment
 Select ESP32 Board Variant by un-commenting the appropriate #define in config.h
1 ESP32 Dev Module - there are several sub-variants that work
4 Heltec Wifi Kit 32
5 LILYGO® TTGO T-Display ESP32 1.14" ST7789 Colour LCD
6 LILYGO® TTGO T2 ESP32 OLED Arduino IDE board = "ESP32 Dev Module"
7 ESP32 Dev Module with ILI9341 2.8" colour TFT SPI 240x320
Select Input Channel. How does telemetry enter the tracker?
Select one only of these input channels by un-commenting the appropriate #define in config.h
0    Serial Port (default) - all protocols
1    Mavlink BlueTooth Classic- ESP32
2    Mavlink WiFi - ESP only
3    FrSky UDP - ESP only
4    FrSky BT classic - ESP32 only
Select only one Telemetry Protocol by un-commenting the appropriate #define
0 AUTO detect protocol
1 Mavlink 1
2 Mavlink 2
3 FrSky S.Port
4 rSky F.Port 1
5 FrSky F.Port 2
6 LTM
7 MSP (not implemented)
8 GPS NMEA
Select one heading source. We use this to relate the external world of co-ordinates to the internal tracker co-ordinates.
1 Flight Computer GPS
2 Flight Computer Compass
3 Trackerbox_Compass
4 Trackerbox_GPS_And_Compass
Select magnetometer (compass) type, #define one
HMC5883L
QMC5883L
If the tracker box has a GPS AND a compass attached, we support a moving tracker. For example,`
the tracker could be on one moving vehicle and track a second moving vehicle, or a 'plane could `
always point an antenna at home base.`
Set 'Home' position on arming of motors, else set home position when button pushed
#define SET_HOME_AT_ARM_TIME
If power is lost and restored within decay secs, the home position is restored from non volatile memory (NVM) #define
#home_decay_secs 60
Set Bluetooth Settings by un-commenting the appropriate #define
NOTE: The Bluetooth class library uses a lot of application memory. During Compile/Flash
you may need to select Tools/Partition Scheme: "Minimal SPIFFS (1.9MB APP ...) in the Arduino IDE
We have two possible Bluetooth channels, one for Mavlink and another for FrSky telemetry
Mavlink
1 Master Mode - active, initiate connection with slave name
2 Slave Mode - passive, advertise our hostname & wait for master to connect to us
Now enter the Mavlink slave name between the double quotes, for example "Mavlink2BT" or "TARANISEP"
FrSky
1 Master Mode - active, initiate connection with slave name
2 Slave Mode - passive, advertise our hostname & wait for master to connect to us
Now enter the Mavlink slave name between the double quotes, for example "Frs2BT"
Select these General Settings by un-commenting the appropriate #define
#define QLRS    variant of Mavlink
#define Data_Streams_Enabled   This option requests data streams to be sent from FC. Requires both rx and tx lines to FC. Rather set SRx in Mission Planner
Select Servo Settings by un-commenting the appropriate #define
#define Test_Servos - Move servos through their limits (optionally, try box_hdg every 45 degrees of circle)
#define Az_Servo_360 - Means the azimuth servo can point in a 360 deg circle, elevation servo 90 deg
                     - Default (comment out #define above) is 180 deg azimuth and flip over 180 deg elevation
Set the degree range of the servos here. Do not adjust servo mechanical limits here.                         `
#if defined Az_Servo_360 - 1 x 360, 1 x 90 (or 180) servos
   minAz = 0   -  Az lower limit in degrees, left of tracker facing flying field
   maxAz = 359 - Az upper limit in degrees
   minEl = 0   - El lower limit in degrees, horizontal
   maxEl = 90  - El upper limit in degrees, straight up
#else          -  2 x 180 deg servos
   minAz = 0   - Az lower limit in degrees, left of tracker facing flying field`
   maxAz = 180 - Az upper limit in degrees, right of tracker facing flying field`
   minEl = 0   - El lower limit in degrees, horizontal and forward`
   maxEl = 180 - El upper limit in degrees, horizontal and rearward`
 #endif
Sometimes the mechanical movement of a servo is reversed due to the orientation of its mounting
Its movement may be reversed here to compensate
#define ReverseAzimuth
#define ReverseElevation`
The default min and max PWM values for SG90 servos are 500 and 2400 microseconds.
My 180 deg servos have a PWM range of 700 through 2300 microseconds. Yours may differ.
ADJUST THE MECHANICAL LIMITS OF MOVEMENT OF YOUR SERVOS HERE BELOW
These values are working examples. Your values may well be different.
#if defined STM32F1xx - my STM32 based tracker has different servos
  minAzPWM = 600 - right because mine is reversed, yours may differ
  maxAzPWM = 2200 - left
  minElPWM = 700  - front
  maxElPWM = 2300 - back
#else
  minAzPWM = 625 - right (because mine is reversed)`
  maxAzPWM = 2240 - left
  minElPWM = 700  - front`
  maxElPWM = 2257;  // back  `
#endif
Set WiFi options by inserting your desired values. These are working examples.
#define Start_WiFi - Start WiFi at startup, override startWiFi pin`
#define HostName  "Frs2BT" - This translator's host name`
#define APssid     "AntTrackAP" - AP SSID that we advertise
#define APpw       "12345678"   - Change me! Must be >= 8 chars
#define APchannel   9  - The wifi channel to use for our AP
#define STAssid   "FrSkyToWiFi" - Target AP to connect to (in STA mode)
#define STApw      "password"   - Target AP password (in STA mode). Must be >= 8 chars
Choose one default mode for ESP only - AP m STA means connect to a known host
1  - AP means advertise as an access point (hotspot)
2 - STA means connect to a known host
3 - (STA>AP) STA failover to AP - means try to connect to STA, but if you can't failover to AP mode
Choose one default protocol - for ESP only
#define WiFi_Protocol 1  - TCP/IP
#define WiFi_Protocol 2  - UDP
Enter your STA mode name and password here. These are working examples.
STAssid =  "EZ-WifiBroadcast" - name
STApw =       "wifibroadcast" - password
Another example    `
STAssid =     "TXMOD-54-DD-FE"
STApw =       "txmod123"
Enter your WiFi port numbers for TCP and UDP here. Your local port must match
TCP_localPort = 5760 - You listen on this read port
TCP_remotePort = 5760 - You send to this port
UDP_localPort = 14550 - Mavlink readPort. If you have declared a FrSky port, the port number will be UDP_localPort +1
UDP_remotePort = 14555 - Mavlink sendPort. If you have declared a FrSky port, the port number will be UDP_remotePort +1
⚠️ **GitHub.com Fallback** ⚠️