Git Product home page Git Product logo

clooney82 / mavlink_frskysport Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wolkstein/mavlink_frskysport

62.0 24.0 17.0 103.18 MB

This MavLink_FrSkySPort repository is discontinued! The development is moved to athertop/MavLink_FrSkySPort. Please do not use this repo, and follow the link to athertop.

Home Page: https://github.com/athertop/MavLink_FrSkySPort

License: GNU General Public License v3.0

Lua 10.43% Arduino 78.65% C++ 4.59% Shell 6.34%

mavlink_frskysport's Introduction

#MAVLink to FrSky S.Port Protocol Converter

Main Screen

Please note - version 2.0 and newer of this project (OpenTx 2.1 and 2.2 only) has relocated here: https://github.com/athertop/MavLink_FrSkySPort

This repo holds upto version 1.8 and also the OpenTx 2.0 branch.

##For more Informations have a look at our Wiki

mavlink_frskysport's People

Contributors

athertop avatar chsw avatar clooney82 avatar ddyeakley avatar fnoop avatar wolkstein avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mavlink_frskysport's Issues

Arduino compiling problem

Hello when arduino is compiling telemetry code, arduino error occur.

Arduino: 1.6.7 (Windows 10), TD: 1.27, Vývojová deska: "Teensy 3.2 / 3.1, Serial, 72 MHz optimized, US English"

FrSkySPortTelemetry:116: error: token "Â" is not valid in preprocessor expressions

if defined USE_SINGLE_CELL_MONITOR || defined USE_FLVSS_FAKE_SENSOR_DATA

^
exit status 1
token "Â" is not valid in preprocessor expressions

remove unused images and sound file

We hava a lot of images and sound files provided.
Not all are used, maybe we can sort out images and sound file which are not used.

And also, we could regenerate sound files completely, to have a consistent voice.

No GPS data and energy calculations shown

Hi,
Teensy 3.2
OpenTx 2.1.17
3DR Pixhawk

Looking at Telemetry page (12) on the Taranis , the sensors seems to be there , as i.e. the Gps position, but they did non show in the display when using coptr217.lua .

  • No Gps fix or data
  • No Watt, mAh ,Wh calculations,
  • no flighttime, no max alt
  • Heading, speed, altitude , yes .
    Using Telem1.lua generate a memory error

Really do not know how to solve it.
I check again and again but could not find a solution .

Not all telemetry values are shown

Hi

I'm using a teensy-lc and not all telemetry values are shown on a APM 2.6 running the last supported version of Arducopter, on the Telemetry window voltage is displayed incorrectly vs what the sensor shows. HOP and satellite info is not shown, same for heading I get blank values on those. I can see mode is shown correctly and on the telemetry sensor value the voltage and accelerometer info for y/z vibration and current are shown correctly int he sensor info.

LED Control

Hi,

i would like to use the led_control part of this code.

I did as stated in the wiki:

I copied all led_control.ino to the right folder (separately).
i uncommented USE_RC_CHANNELS and USE_TEENSY_LED_SUPPORT.

But it does not compile any more.
The compiler states that 'Teensy_LED_Init()' and "Teensy_LED_process()" in their respective main file function and all functions in "Teensy_LED_process()" and "default_mode(int, float)" of led_control "was not declared in this scope".

I use arduino ide 1.6.6 and AC 3.2 (commented accordingly).

How can i get it to compile?
Thanks very much!

to much severity messages.. or to slow?

severity messages currently flute taranis. after my changes on teensycode, commit: 057c3a6 , all severity messages will send to taranis. at least this is very good, but the cons, this are a lot of messages. after arming you hear around five messages.
calibration- beside init- and ready- messages. after this flightmode and at least the armed message. this need arround 10-15 seconds. at least the vehicle is armed while taranis is still reading pre arm messages. in my case the motors spin since 7 seconds befor taranis is ready with all pre arm messages and say arming. this is not really a problem but a little bit a feeling like an audio offset in films. you see something but you hear it later.

currently teensy repeat each message 1400ms. this produce at least a small time gap on taranis between messages. this mean reducing this to 1100ms save some time without the risk to loose messages because RPM T2 only transmit each 1000ms. but this recover only 2 seconds.

any other ideas?

/g
wolke

Compile for Teensy LC

Hello,
I tried to compile "s-c-l-v-rc-opentx2.1" for "Teensy LC" but I ran in problems, I got:
C:\Program Files (x86)\Arduino\libraries\FrSkySportTelemetry/FrSkySportSingleWireSerial.h:12:28: fatal error: SoftwareSerial.h: No such file or directory

include "SoftwareSerial.h"

Pawelsky wrote on http://www.rcgroups.com/forums/showthread.php?t=2245978 "a library, that allows to emulate the FrSky S-Port sensors using Arduino compatible Teensy 3.x board or 328P based boards .." does this library works for Teensy LC?
I tried al lot of thing, new Install Arduino, to include the SoftwareSerial library in main sketch, no change. What can I, a Noob, do?

void LSCM::setCellDivider() isn't correct!

I was wondering why just the last cell was displaying the right value and started debugging.
I found out that just the last value of the individualcelldivider was taken from my function call in MavLink_FrSkySPort.
When looking at the setCellDivider function, the fault is clear:
The if condition becomes true just for the last cell value.

I made a fix:

void LSCM::setCellDivider(double a, double b, double c, double d, double e, double f,
                          double g, double h, double i, double j, double k, double l)
{
  if(a==0.0)
    return;
  _individualcelldivider[0] = a;

  if(b==0.0)
    return;
  _individualcelldivider[1] = b;

  if(c==0.0)
    return;
  _individualcelldivider[2] = c;

  if(d==0.0)
    return;
  _individualcelldivider[3] = d;

  if(e==0.0)
    return;
  _individualcelldivider[4] = e;

  if(f==0.0)
    return;
  _individualcelldivider[5] = f;

  if(g==0.0)
    return;
  _individualcelldivider[6] = g;

  if(h==0.0)
    return;
  _individualcelldivider[7] = h;

  if(i==0.0)
    return;
  _individualcelldivider[8] = i;

  if(j==0.0)
    return;
  _individualcelldivider[9] = j;

  if(k==0.0)
    return;
  _individualcelldivider[10] = k;

  if(l==0.0)
    return;
  _individualcelldivider[11] = l;  

}

Telemetry using Arduino Pro Mini/Mega2560 R3 not working

I haven't received my teensy 3.1 board yet. So I picked the arduino boards which I had.

And after compiling, I found the SRAM was used up for Arduino Pro Mini.
Then I used another board to do the testing, Arduino Mega2560 R3 which has more SRAM. ( I was not planning on flying a Mega2560 to the sky,just a test 😄 )

Yes, I successfully burned the telemetry codes for the teensy2.0 or Arduino Pro Mini to Arduino Mega2560 R3. ( It's on my Taranis X9D Plus with opentx 2.1.3 )

And I used the Serial1 ports for telemetry and the default Serial ports for debugging.

But I could not get parameters from debugging console. Yet there were no things passing to my FrSkyTaranis X9D Plus RC controller but the RSSI, SWR, Receiver battery voltage.

I don't know whether the MavLink protocol was translated on the board.

  1. Do you know how to fix it?

  2. Or if for arduino Pro Mini, which scope of codes is compatible, can you provide the link?

Thank you! 🙇

xros

Add a telemetry screen for messages, add mute option

It would be nice to have a visual messaging system with the option of muting voice alerts. There are a few scenarios where voice alerts disturb the environment (either people or animals, and my wife during development). It would be great to have either a single line on the main telemetry screen for displaying current messages, or else a separate telemetry screen (there used to be one, it was very useful for displaying history of messages on taranis while flying).

Fix mavlink setup

Longstanding bug where if APM serial parameters are not set to broadcast unconditionally then we don't request/connect. Currently on the pixhawk as of apm:copter-3.3, Telemetry1 and Serial4 are set to broadcast unconditionally where as Telemetry2 isn't (who knows why), which causes confusion.
Users shouldn't have to set SR2_x (or SR1_/SR4) in APM firmware parameters, it should be requested by us.

lua telem1.lua Radar do not work

the radar on telem1.lua do not work correctly. heading is displayed but no movements on screen. also distance to home is zero.

/g
wolke

Copter 3.3 Final in on

Hi

Just checked that 3.3 Copter is released as a soft release. It won+t appear for a few days yet on the GCS menus, but if one chooses beta firmwares the final code is available.

Compatibility with PX4 flightstack

Hi there,
since Arducopter development has been slow recently and might come entirely to an end (3DR has terminated contracts with most of the arducopter lead developers) i would love to see this project adapted to the PX4 flightstack. Many of the developers have changed to PX4 now and PX4 is currently getting a huge boost in means of updates, features, useability and Co. Looks like PX4 will be the 1st choice in medium- to long-term.

I have tried the solution on a Pixhawk with PX4 but it does not work. I think this is because currently there is no way to configure the Serial-parameters for the TELEM Ports in PX4.
Probably this code can be adapted to work with PX4 out of the box?

Best regards and many thanks in advance.

  • careyer

OpenTx 2.1.7 - new PREC1 PREC2 formatting breaks telem screen

I did a test flight tonight using OpenTx2.1.7 for the first time. The battery voltage was displaying at 10% of its actual value and Cmin voltage was reading as just 1% of its value and satellite count was not displaying correctly either. Did some research and it appears that in 2.1.7 the OpenTx devs have reverted the functionality of the PREC1 and PREC2 formatting within LUA back to the way these worked in OpenTx 2.0. This means that to display values with PREC1 you need to multiply the value by 10 first and for PREC2 values, you need to multiply them by 100 first.
The formatting change in 2.1.7 is described here: opentx/opentx#3150

This will require some changes to the LUA to make it comply with the new formatting changes. I will tweak my own copy to test this.

All telemetry slots full

i have read the conversation on this topic on the diydrones forum and based on the explanation given this is caused by duplicate sensor stuff.

I started with a clean model and entered all the sensors manually (model file available on https://drive.google.com/folderview?id=0BxM1Ej9W_KZ7flI0cFJsaGZwTDVId2stSkxQT29OTmhpUF9pc0FleUxkUGl2UWRqQzV5NkE&usp=sharing ) according the pictures provided by Clooney. My understanding is that the error should not come up in this case, right?

But it does. Environment used is EeePC1201N / Opensuse13.2_64 / companion 2.1.1

Since i don't have my Teensy3.1 programmed yet i purely do the tests with companion simulator.
Error message appears when i start simulating parameters and enter something (other than RSSI, SWR or A1).
screenshot - 09052015 - 11 22 27 pm
screenshot - 09052015 - 11 25 06 pm

Add a proper License model to this project.

we need an license model for this project.
imo,
c/c++ and lua code can licensed under gpl3 (GNU GENERAL PUBLIC LICENSE)

and images snd-files and other documents can distributed under cc license. and in this case IMO not free for commercial use.
like this:
http://creativecommons.org/licenses/by-nc/4.0/
88x31

in our case we have to talk with
https://github.com/chsw (Christian) who starts the project
and
https://github.com/lvale (Luis Vale) who add a lot of snd files and images. also our telm1 script is at least a copy from him. i modified a lot but the base layout are from him. i create the radar and the Wh gauge.

/g
wolke

edit:
imo, if we allow it for commercial use, we get a lot of support questions based from people which buy ready tu use teensy3.1 mavlink converters. i follow some commercial activity where on-line-stores offers teensy3.1 or pro mini boards for more than 50 bucks.

Duplicate telem1.lua scripts

./Lua_Telemetry/DisplayApmPosition/SCRIPTS/Model_Name/telem1.lua
./Lua_Telemetry/DisplayApmPosition/SCRIPTS/TELEMETRY/telem1.lua

Do we still keep the Model_Name directory/scripts around to support opentx-2.0? I suspect we should just delete it and only support opentx-2.1 going forward?

FrSky/OpenTx to Ground Station as a relay

I saw that the Rx on teensy 3.1 board has not been used yet.
The teensy board is only used to translate MavLink protocol to FrSky OpenTx. It's only one direction.
If you want to control the drone, you will have to use your RC radio and hit the stick or something on it. And here it has nothing to do with the Ground Station software.

Here I ask that how about connecting FrSky/OpenTx to ground station as a relay.
Then we do not need 3DR digital transmitter anymore. And only one radio would work.

How do you think?

which one is the correct telem1.lua?

under /SCRIPTS/TELEMETRY there is a telem1.lua and telem1_dev.lua
if i copy both into the SDcard structure companion sees only the telem1 because filename telem1_dev is too long.

Please keep the one and only version (that is further developed) within the directory.

For the time beeing i assumed that telem1_dev.lua is the latest one. I have renamed telem1 to telem0 and telem1_dev.lua to telem1.lua on my machine. Will start testing with this one.

Phenomenally irritating claxon on by default

I've disabled by removing SOUNDS/en/ALARM* files. I remember other people have also reported the same thing, I assume it's something that's on by default for the single cell code?

some Telem issues after first test

hi,
today i test the telem on opentx2.1.3.

issues that i noticed on telm1 screen.

  • flight timer do not toggle from armed status. - armed status? - severity messages?
  • no severity messages. - RPM sensor?
  • no gps satellite cont.
  • heading is only refreshed if gps status is 3

/g
wolke

Milestones

I´d like to implement Milestones for major changes on the source.
What do you think about this idea?
Maybe you can also bring your ideas for milestones in.

Duplicate FastLED library warning/notification

In file included from led_control.ino:18:0:
Arduino/libraries/FastLED/FastLED.h:12:2: warning: #warning FastLED version 3001000 (Not really a warning, just telling you here.) [-Wcpp]

warning FastLED version 3001000 (Not really a warning, just telling you here.)

GPS fix handling with AC3.3

A Little bug from diydrones:

The Teensy sends GPS Data only, if the APM signals a 3D fix to avoid the use of bad coordinates.

The newer APM Firmware (I'm using the latest AC 3.3 Beta) expands the GPS Status to 4=DGPS, 5= RTK.

All discussed implementations here include at least 2 conditional statements in their Arduino sketches for

GPS Status testing:

          if(ap_fixtype==3)

So, if you're using a modern GPS chip and get a DGPS fix, ap_fixtype will become 4 and the GPS data on your Taranis stucks...

The Solution is simple, please change all occurences of "if(ap_fixtype==3)" to "if(ap_fixtype>=3)" and your Taranis

Create wiki

Wouldn´t it be great to have a wiki for this project?

Provide .zip GCS_MAVLink library

FrSkySportTelemetry.zip and FastLED.zip are in zip form but GCS_MAVLink is in directory form. Should be zip form with instructions in readme for installation.

Can we reduce message stream rate to 5hz?

If we request more streams for more functionality we'll likely start to saturate the link (anyone know how to determine how much of the link bandwidth we're using?).
Can we reduce the stream rate requests to 5hz from current 10hz? Is there logic that currently absolutely depends on 10hz?

Distance from home not displaying in radar

Running latest 2.1 code (and with APM 3.3)
distance from home - the arrow on the radar display, even though it pointed in the correct direction for the copter heading, it stayed in the centre and the distance value under this radar stays at '0m'.

Lipo Singe Cell Monitor - write down formula for divider and don't use custom values in example

Hi!

Great project!

I was irritated by the posted values in the wiki for the divider. As for people who don't wnat to take a closer look into the code this is just a black box, the equation leading to the divider should be written down somewhere. After figuring out ADCref ist 3,3V and 8191/3,3 * Rgnd / (Rseries + Rgnd) it still does not match the values - as the values in the wiki are given for 0,001% accuracy (really!?) this is misleading.

BR
Robert

error messages on taranis

when i arm my apm 2.6, i get two messages read aloud from the taranis. they are Arm throttle below failsafe, and Arm leaning. Then i get the arming motors/motors armed. I dont see these messages in the Mission Planner so im wondering if its an error in the lua script maybe? Using 2.1.5 open tx and latest version apm 2.6

Nativ Mavlink Telemetry in OpenTX

No issue but request for help pushing the request on the opentx branch ;-)

There is request #2354 on the opentx branch requesting native mavlink support on opentx.
Means that opentx does the mavlink parsing and values are available as telemetry.

That would eliminate the need for an Teensy and the small size FUL-1 can be used for people not needing single cell voltage/LED control.

On the other hand the Teensy does not need to translate Mavlink into FrSky but just parse MavLink and do packet/data injection if needed eg. for single cell voltage.

if you also see benefits please push the #2354 request by adding comments there.

Thank you!

Add Option to disable Wh reading and display/alerts

I would like to be given the option of entering 0 against 'BatCap Wh' on the Offset screen to disable the Wh monitoring and display.
I personally require more real estate on the telem1 screen to display mAh as I use large cells requiring 5 digits to display this value - as both this value and the Wh values grow, the two fields merge into one on the Taranis Plus display, and the mAh label is overwritten with the Wh value making a line of just numbers which then do not make any sense.
Secondly, even though Wh is the true reading of power consumed, other than it being nice to have that info to hand, it doesn't serve any real practical purpose - Our LiPos are labelled with mAh capacity values (and not Wh), and as most modern chargers do not have Wh readings its increasingly more difficult to determine an axccurate Wh capacity for any one LiPo battery (in order to correctly set the Wh offset in LUA). It seems therefore that the Wh reading doesn't serve any real practical purpose. Having the option at least to turn this off on the display (along with associated alerts/alarms) would be helpful.

removing HEX files ?

Is it possible to remove pre compiled HEX files, or should someone update them?

include a user defined function- Enhacement

in order to make the code transparent to accommodate a user defined function without the need to include it on the main code , it could be of great help to add into the main LOOP , a user_definedFunction() ; line of code .
and also include a void user_definedFuncition{} ; separate file for the user to complete ( if needed)

Brake Mode not displaying/calling - code fix detailed in post

If you select Pause mode (new in 3.3) it siaplays/calls "Invalid Flight mode". I have tracked this down to line 498 which reads:
if FmodeNr<1 or FmodeNr>17 then

it should read:

if FmodeNr<1 or FmodeNr>18 then

FmodeNr is set in the LUA to the Telem Flight Mode + 1, but the Pause Mode is APM mode 17, so this sets FmodeNr to 18 which the current line 498 equates to TRUE so fmodeNr is set to 13 inside the IF staement, which is 'Invalid flight mode'. Simple fix - replace 17 with 18, or instead use table.getn(FlightMode) to simply refer to the array length. This way you can add future flight modes to the start of this code without worrying about This IF statement.

Strip whitespace?

Some of the current code (eg. telem1.lua, at least) has quite a lot of trailing whitespace even in empty lines. Default git editor atom strips superfluous whitespace by default so editing files in atom creates diffs /commits with a lot of changes. Do we allow this, or do we ignore it (atom for example you can disable the trailing whitespace plugin), or do we use this issue to sweep through the code and remove all superfluous whitespace?

Hi,

i locally use in my telem1 script timer2 in manual reset mode to record over all motors armed time.
i do this because after 80 hours of motor runtime i change all bearings on them.
maybe this feature is only interesting if people fly in a commercial way and have to setup correct pre-post flight checklists also beside to follow maintenance intervals by default.

but i like this feature this really help to remember to check essential mechanical parts.
i use it no to remember me at 80 hours to do an full inspection and motor service.
than the timer reset to zero.
all 5 hours of flighttime it remember me to check all screws.

of course it is possible to increse services remember actions.
sice 2.1.2 timer go up to 157 hours. befor it was limited to -8 - + 8 (16) hours.

if people like this i can add it to our repo.
telem1 screen shot:
screenshot-2

/g
wolke

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.