Thread Tools
Sep 09, 2018, 12:55 PM
AMA 697691 / FAA 13675
So the reason there was a Teensy revision associated with the blink files is that the LED pin changed over the years. Since Teensy 3.x, it has matched the Arduino boards.

I'm close now with Arduino and the Teensy plug-ins and Eric's two additional libraries. I get this error message for both LOW and HIGH when trying to compile. Using Arduino v1.8.6.

Quote:
error: 'MavLedState' was not declared in this scope

if (MavLedState == LOW) {
Error compiling for board Teensy 3.2 / 3.1.
Last edited by Greg Covey; Sep 09, 2018 at 02:48 PM.
Sign up now
to remove ads between posts
Sep 09, 2018, 04:45 PM
Registered User
Hmmm -- maybe I am using a Teensy 3.2. I may not be totally correct then -- but i swore that they were firmware identical. Do you mean Teensy 3 or 3.1. I think the Teensy 3 is slightly different.

Maybe someone can chime in?
Sep 10, 2018, 07:04 AM
AMA 697691 / FAA 13675
I'm using Teensy 3.1. When the "Program" button grayed out on the Teensy Loader app after I selected Eric's hex file, it made me suspect that the size was too large for the Teensy 3.1. It's just a guess because I don't know what else the app could use to determine file readiness.

Anyway, I'll try to fix my compile error this week. I suspect that using Arduino v1.8.6 may be the culprit as it has more validity checking. Perhaps someone that has successfully compiled the code can say what version Arduino they used?
Latest blog entry: Greg's Web Hangar
Sep 10, 2018, 07:46 AM
Registered User
Quote:
Originally Posted by Greg Covey
I'm using Teensy 3.1. When the "Program" button grayed out on the Teensy Loader app after I selected Eric's hex file, it made me suspect that the size was too large for the Teensy 3.1. It's just a guess because I don't know what else the app could use to determine file readiness.

Anyway, I'll try to fix my compile error this week. I suspect that using Arduino v1.8.6 may be the culprit as it has more validity checking. Perhaps someone that has successfully compiled the code can say what version Arduino they used?
Greg, I will have a look later today at my setup. I think I have a Teensy 3.1 around as well.
Sep 10, 2018, 06:17 PM
AMA 697691 / FAA 13675
So it looks like the script was unhappy with MavLedState not being declared above so I added the line below near the other booleans. It compiles and runs now! The script is using only 14% of the Teensy 3.1 capacity.

bool MavLedState = HIGH;
Latest blog entry: Greg's Web Hangar
Sep 11, 2018, 06:27 AM
Registered User

Sport to Mavlink


Hello please correct me if im not in the correct thread. I am using the R9m radio module. Since they provide telemetry via Sport on the back of the module. I am wondering if if and how i can convert the Sport Signal back to mavlink for GSC and an antenna tracker via a Bluetooth module. So far i could not find any solution.
Sep 11, 2018, 11:52 AM
AMA 697691 / FAA 13675
Quote:
Originally Posted by Sinned88
Hello please correct me if im not in the correct thread. I am using the R9m radio module. Since they provide telemetry via Sport on the back of the module. I am wondering if if and how i can convert the Sport Signal back to mavlink for GSC and an antenna tracker via a Bluetooth module. So far i could not find any solution.
I can see the need for this when using the FrSky R9 radio module but I have not seen a solution for S.Port back to MavLink...yet.
Latest blog entry: Greg's Web Hangar
Sep 11, 2018, 03:09 PM
Registered User
Quote:
Originally Posted by Greg Covey
I can see the need for this when using the FrSky R9 radio module but I have not seen a solution for S.Port back to MavLink...yet.
Excatly! It has been done before
FrkSky Telemetry To DroidPlanner Mavlink through external Bluetooth (2 min 3 sec)
but the project has never been finished. I will start a new thread and look for people who have the same problem and maybe will find a solution. I will post the link to the thread later.
Sep 13, 2018, 01:40 AM
Registered User
Thread OP

Frsky 2Mavlink


Quote:
Originally Posted by Sinned88
Excatly! It has been done before https://www.youtube.com/watch?v=zOksCqtIL4s but the project has never been finished. I will start a new thread and look for people who have the same problem and maybe will find a solution. I will post the link to the thread later.
Hey Guys

Sorry I've been otherwise occupied. I believe you solved the issues around converting on an Arduino. If I can help please say.

On the subject of converting Frsky passthru back to Mavlink, I started a project to do this back in January, but it became irrelevant to me and I canned it. Nevertheless, the converter did work for the basic record types and seemed to drive the MP Hud ok. Here it is for what it is worth. It's written for an STM32 but should work on an Arduino with a few minor changes. Remember that Frsky telemetry currently has not way to initiate the download of parameters (the available bandwidth would be heavily loaded anyway). The GPS record types are there, so it should be good to go for a tracker.

Here is the GitHub link
Sep 13, 2018, 05:53 AM
Registered User
You are awesome! Thanks I will be back from holiday in a week and my teesy is on the way. Then I will try it out.
Sep 15, 2018, 09:51 AM
Registered User
Quote:
Originally Posted by zs6buj
Apparently we have to invite you. I'll ask Alex to do the honours.
Hi Eric,

Same thing for me - no access rights. Am kelly on ArduPilot and would like an invite, too, please.
Sep 15, 2018, 04:37 PM
Registered User
Quote:
Originally Posted by kjordan
Hi Eric,

Same thing for me - no access rights. Am kelly on ArduPilot and would like an invite, too, please.
Kelly, I sent you an invite.
Sep 17, 2018, 03:48 PM
AMA 697691 / FAA 13675
I have not been successful at getting the MavlinkToPassthru firmware to run on my setup. It starts up ok on the Yaapu telemetry, making it past the flight mode announcement and "GPS 3D fix Lock", but then I hear "Telemetry Lost" from my Taranis X9D and the Teensy 3.1 LED stays on instead of slow flashing. I have tried .hex files from MavlinkToPassthru firmware v0.11, v1.0.4 and v1.0.5. They all crash the same way.

I am using a Taranis X9D with OpenTX 2.2.1 and Yaapu v1.5.0. Any ideas are appreciated...

Here is my code setup for v1.0.4:

Quote:
#include <CircularBuffer.h>
#include <GCS_MAVLink.h>

//************************************* Please select your options here before compiling **************************
//#define PX4_Flight_stack // If your flight stack is PX4 and not APM, un-comment this line
// Choose one (only) of these target boards
#define Target_Board 0 // Teensy 3.x Un-comment this line if you are using a Teensy 3.x
//#define Target_Board 1 // Blue Pill STM32F103C OR un-comment this line if you are using a Blue Pill STM32F103C
//#define Target_Board 2 // Maple_Mini STM32F103C OR un-comment this line if you are using a Maple_Mini STM32F103C

// 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

//#define Use_Local_Battery_mAh // Un-comment this if you want to define battery mAhs here, no FC tx line needed. Alternatively
// enter battery capacities into yaapu's LUA script menu

const uint16_t bat1_capacity = 5200; // These are ignored if the above #define is commented out
const uint16_t bat2_capacity = 0;

#define SPort_Serial 1 // The default is Serial 1, but 3 is possible if we don't want aux port

//#define Aux_Port_Enabled // For BlueTooth or other auxilliary serial passthrough
Last edited by Greg Covey; Sep 17, 2018 at 04:27 PM.
Sep 17, 2018, 05:56 PM
AMA 697691 / FAA 13675
By cutting the supply line from the USB power to the Teensy, I can connect the USB cable to the PC for uploading firmware anytime and power the Teensy by the Taranis. It makes for a safe and convenient way to test the MavlinkToPassthru firmware and I can always mount it inside the OrangeRx module when finished.
Latest blog entry: Greg's Web Hangar
Sep 18, 2018, 05:29 AM
RC fanatic
Quote:
Originally Posted by Greg Covey
By cutting the supply line from the USB power to the Teensy, I can connect the USB cable to the PC for uploading firmware anytime and power the Teensy by the Taranis. It makes for a safe and convenient way to test the MavlinkToPassthru firmware and I can always mount it inside the OrangeRx module when finished.
I power my teensy via a diode, so can connect USB to program it without it passing on USB power to other devices,si no need to disconnect power line any more


Quick Reply
Message:

Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Discussion Mavlink on 9xr via 3dr radio without frsky or openlrs. jt41time Multirotor Drone Electronics 4 Oct 17, 2014 07:51 PM
Discussion 9XR mavlink mod help.... No modules, No FrSky... jt41time Multirotor Drone Electronics 6 Aug 28, 2014 06:42 PM
Discussion Anyone know how to convert DX7 to FrSky 2.4Ghz using the DIY module from FrSky?? roberted5 DIY Electronics 6 Sep 09, 2011 10:43 AM