-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
relay mode doesn't seem to work #20
Comments
burtgree, I would be happy to help you make Mav2PT work in Relay mode. Let's take it one step at a time, and let's use the latest version Mav2PT_v2.31. Can you successfully compile and flash? |
Go to confihg.h and config there exactly as you have illustrated above. I assume you are using a long range system (LRS)? |
Eric I checked that my setup was still working with the 2.14, it was. Starting .... d:\Users\XXXXX |
The sensor table (output to S.Port) overflows because nothing is being forwarded from it. In relay mode I read from the ground FrSky receiver to find a sensor slot, and push our new sensor frame into it. That is likely not happening for some reason. Since 2.14 is working for you, and your config looks correct, I should test relay mode here again to make sure it's working for me. If you find the time you could un-comment //#define Frs_Debug_All and post the serial output here for me. |
Eric attached is about a minute of debug info like you asked for. Like before, I tested the setup with 2.14 first, so I know the wiring is all correct, just uploaded the new bin. later |
burtgree I apologise for doubting your information! A nasty typo affecting relay mode was introduced in v2.17. #define BufStatusLed 14 overtyped as BufStatusLed 1 (SPort) ! So the S.Port could not read (it could still write) from the FrSky receiver. Well spotted, and thank you for you assistance. Eric |
Eric Thanks, just tried it and works. now if I could only get a ESP32 working. I came to the conclusion it's the libraries for each board. |
Tell me which board you have. Maybe send a picture and we can work it out. |
I guess you know you must insert a bi-directional two-wire to single wire converter when you use the ESP32. The ESP32 can invert, but not convert to single wire. |
I use this inverter/converter. Since the commercial board inverts and converts to single wire, the ESP32 must not invert in Relay Mode. I changed v2.33 accordingly for convenience. |
Eric Bluetooth worked, still problems with wireless, but it has to do with the libraries for each board. the board I'm using is this one. https://www.amazon.com/gp/product/B07Q576VWZ/ref=ppx_yo_dt_b_asin_title_o07_s00?ie=UTF8&psc=1 I use these 2 libraries: one has problems with the way IP addrresses are used, the other one doesn't like serial ports defined the way your code does it. I hard coded some changes & have it working, but losing over 50% of packets. In my own attempt to get wireless working, I created a buffer for the UDP packets being sent out of the ESP32. I can get 3 to 4 packets in one buffer, and send that all at once. makes my packet lose down to about 15%. Thanks for all the hard work, I don't know how your mind can keep all the if & endif straight. |
Hi burtgree, I'm please you got some use out of it. I wonder if you have a lot of RFI nearby causing the lost packets? I assume you view lost packets in Mission Planner? Good work on the buffering. Perhaps we should incorporate it. Yeah, the multi-platform thing is a bit of a challenge, but it became very difficult to keep the versions aligned with separate code for each platform. You probably noticed I don't like capitalizing macros because readability suffers (in my opinion). |
Correct. Thank you! |
Eric |
Thank you for this burtgree. I'm going to try your buffering tomorrow. :) |
Been doing some testing, using a teensy 3.2 board.
found that I can make it work with version 2.14 correctly.
I didn't try every version but 2.14 works, but 2.17 up to 2.32 don't seem to work anymore.
below are the settings I used with 2.14
// ******************************* Please select your options below before compiling *******************************
// Do not enable for FlightDeck
#define PlusVersion // Added support for 0x5009 Mission WPs, 0x50F1 Servo_Channels, 0x50F2 VFR_Hud
// Choose one only of these three modes
//#define Ground_Mode // Converter between Taranis and LRS tranceiver (like Orange)
//#define Air_Mode // Converter between FrSky receiver (like XRS) and Flight Controller (like Pixhawk)
#define Relay_Mode // Converter between LRS tranceiver (like Orange) and FrSky receiver (like XRS) in relay box on the ground
// Choose one only of these Flight-Controller-side I/O channels
// How does Mavlink telemetry enter the converter?
#define FC_Mavlink_IO 0 // Serial Port (default)
//#define FC_Mavlink_IO 1 // BlueTooth Classic - ESP32 only
//#define FC_Mavlink_IO 2 // WiFi - ESP32 only
//#define FC_Mavlink_IO 3 // SD Card / TF - ESP32 only
// Choose one only of these GCS-side I/O channels
// How does Mavlink telemetry leave the converter?
// These are optional, and in addition to the S.Port telemetry output
//#define GCS_Mavlink_IO 9 // NONE (default)
//#define GCS_Mavlink_IO 0 // Serial Port
//#define GCS_Mavlink_IO 1 // BlueTooth Classic - ESP32 only
//#define GCS_Mavlink_IO 2 // WiFi - ESP32 only
//#define GCS_Mavlink_SD // SD Card - for ESP32 only
// Choose one - for ESP32 only
//#define WiFi_Protocol 1 // TCP/IP
//#define WiFi_Protocol 2 // UDP useful for Ez-WiFiBroadcast in STA mode
// Choose one - AP means advertise as an access point (hotspot). STA means connect to a known host
//#define WiFi_Mode 1 //AP
//#define WiFi_Mode 2 // STA
//#define Battery_mAh_Source 1 // Get battery mAh from the FC - note both rx and tx lines must be connected
//#define Battery_mAh_Source 2 // Define bat1_capacity and bat2_capacity below and use those
const uint16_t bat1_capacity = 5200;
const uint16_t bat2_capacity = 0;
#define Battery_mAh_Source 3 // Define battery mAh in the LUA script on the Taranis/Horus - Recommended
#define SPort_Serial 1 // The default is Serial 1, but 3 is possible
#define LRS_RSSI // Un-comment this line only if you are using a ULRS, QLRS or similar telemetry system
// ****************************** Set your time zone here ******************************************
// Date and time determines the TLog file name
//const float Time_Zone = 10.5; // Adelaide
const float Time_Zone = 2.0; // Jo'burg
bool daylightSaving = false;
I tried to use the same settings while testing 2.17, 2.20, 2.25, & 2.31
The text was updated successfully, but these errors were encountered: