Thread Tools
Jan 09, 2019, 06:07 PM
iVoid Warranties
flyinghedgehogs's Avatar
At the request of an RCG member, I modified this program to show a number for flight time and battery voltage. Almost all code is still from OP.
Unzip and go! If you need to edit the sensor or switch names, they are at the beginning of the program.

Now with bold text, but no max altitude. Easy to change, uncomment original code.
Last edited by flyinghedgehogs; Jan 09, 2019 at 10:44 PM. Reason: Issue with voltage
Sign up now
to remove ads between posts
Jan 22, 2019, 09:57 AM
Registered User
BarnOwl's Avatar

Very nice !


It is working like a charm on my Taranis. Thank you very much! In the winter weather I was working on my DLG setup and I found your LUA script here, I was looking for something like this.
You see a test I did with my DLG on the ground ( Not getting out there in the mounting snow)

Goog job!
Jan 22, 2019, 03:43 PM
Registered Lurker :)
Thread OP
Quote:
Originally Posted by BarnOwl
It is working like a charm on my Taranis. Thank you very much!
Thanks for the feedback - I appreciate it. That's a nice looking transmitter case!

Cheers,
- John
Jan 23, 2019, 08:18 AM
Registered User
BarnOwl's Avatar
Btw: I forgot to mention I'm using the latest OpenTX, version 2.2.3 (2019-01-07)
Jan 30, 2019, 08:32 PM
Registered Lurker :)
Thread OP
Quote:
Originally Posted by BarnOwl
Btw: I forgot to mention I'm using the latest OpenTX, version 2.2.3 (2019-01-07)
Thank you, this is good to know, as I'm still using flying with v 2.1.9. For v 2.2 I do test the code in Companion, but it's good to get confirmation that it works properly in the transmitter too.

Cheers,
- John
Last edited by filago; Jan 31, 2019 at 08:23 AM.
Feb 04, 2019, 12:51 PM
plays with toy planes
Filago, Hedge, that's a very slick bit of code. Thank you very much!
Feb 18, 2019, 10:47 AM
FIN-5414
meeks's Avatar
Now when I’m finally settled with XLite as my rx I’m quite excited about the possibilities of OTX. Obvious question for now is if this script would work in XLite?
Feb 18, 2019, 11:12 AM
iVoid Warranties
flyinghedgehogs's Avatar
This code presumes a certain screen size and aspect ratio, so no, not at this time.
Feb 18, 2019, 11:15 AM
FIN-5414
meeks's Avatar
Oh well, I only need to dial in the flaps once per model so guess I need to use the X9D+....
Feb 21, 2019, 03:30 PM
Registered User
For compatibility with buttons of x9e and x9d/+ just replace :

if (event == EVT_PLUS_FIRST)
by
if (event == EVT_PLUS_FIRST or event == EVT_ROT_RIGHT)

and

if (event == EVT_MINUS_FIRST)
by
if (event == EVT_MINUS_FIRST or event == EVT_ROT_LEFT)
Apr 19, 2019, 07:53 AM
Registered User
John, I have used your script with iNav, and it works great

Would you be interested in making a change to the script?

The issue I am having is when using the Alt plot with Betaflight (GPS rescue).
As you would know. Most of the mini FC's do not have an onboard barometric sensors. So the only way the FC and telemetry can get altitude information, is from the GPS. But this is absolute altitude.
This wouldn't be a problem when flying at sea level. But at any distance higher than that. The Altitude plot is lucky show a single line across the bottom of the screen.
What i'm asking.....Is there any way for you to note the absolute altitude as a zero reference at Arming. Then use that to extrapolate the Alt Plot?

Thanks
Apr 21, 2019, 11:38 PM
Registered Lurker :)
Thread OP
Quote:
Originally Posted by Rissah
John, I have used your script with iNav, and it works great

Would you be interested in making a change to the script?

The issue I am having is when using the Alt plot with Betaflight (GPS rescue).
As you would know. Most of the mini FC's do not have an onboard barometric sensors. So the only way the FC and telemetry can get altitude information, is from the GPS. But this is absolute altitude.
This wouldn't be a problem when flying at sea level. But at any distance higher than that. The Altitude plot is lucky show a single line across the bottom of the screen.
What i'm asking.....Is there any way for you to note the absolute altitude as a zero reference at Arming. Then use that to extrapolate the Alt Plot?

Thanks
I don't really know anything about Betaflight, but this seems like it should be straightforward enough, as long as it's still only displays altitudes greater than zero (so the Y-axis scaling algorithm can stay the same.)

The part I'm not sure about is how the code will know when to grab the current altitude to store as the "zero" value. Is there a reliable way to watch the altitude telemetry values and know when it has been armed? Or maybe it's better to just provide a way to manually trigger the code to set the current altitude to the zero value, so you have full control over that. With my gliders, I can do a "reset telemetry" from the transmitter any time, which re-teaches zero altitude, and this would be something similar.

So if the code displays altitudes as the delta above the altitude taught at some manually triggered event, does that work for you?

Cheers,
- John
Apr 22, 2019, 05:58 PM
Registered User
Quote:
Originally Posted by filago
I don't really know anything about Betaflight, but this seems like it should be straightforward enough, as long as it's still only displays altitudes greater than zero (so the Y-axis scaling algorithm can stay the same.)

The part I'm not sure about is how the code will know when to grab the current altitude to store as the "zero" value. Is there a reliable way to watch the altitude telemetry values and know when it has been armed? Or maybe it's better to just provide a way to manually trigger the code to set the current altitude to the zero value, so you have full control over that. With my gliders, I can do a "reset telemetry" from the transmitter any time, which re-teaches zero altitude, and this would be something similar.

So if the code displays altitudes as the delta above the altitude taught at some manually triggered event, does that work for you?

Cheers,
- John
The Arming channel is available in the RX telemetry. Although, it would have to be defined by the user, so it knows which channel to look at.
I think your idea of resetting the telemetry once a Sat lock is establish, may be the easiest for you to write. And that would work fine for me.


Thank you
Last edited by Rissah; Apr 22, 2019 at 06:12 PM.
Apr 25, 2019, 10:04 AM
Registered Lurker :)
Thread OP
Quote:
Originally Posted by Rissah
The Arming channel is available in the RX telemetry. Although, it would have to be defined by the user, so it knows which channel to look at.
I think your idea of resetting the telemetry once a Sat lock is establish, may be the easiest for you to write. And that would work fine for me.


Thank you
My apologies for the delay here; I'm currently away on business travel, and will get back to this in a couple of weeks when I return.

Cheers,
- John
Apr 25, 2019, 07:04 PM
Registered User
Quote:
Originally Posted by filago
My apologies for the delay here; I'm currently away on business travel, and will get back to this in a couple of weeks when I return.

Cheers,
- John
That's fine John. Life comes first


Quick Reply
Message:

Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Download An Ardupilot frsky telemetry LUA script for the Horus X10/ X12 and Taranis X9D/E/QX7 yaapu Radios 356 May 21, 2019 03:11 PM
Discussion F5J program for Taranis QX7 and X9D with Lua scripts jfrickmann Electric Competition Soaring-F5J/ALES/e-Soaring 107 May 11, 2019 01:49 PM
Discussion Taranis (x9d) how to program two switches on one channel (different levels)? markm75 Radios 1 May 07, 2016 12:48 AM
Discussion How to program one switch to initiate commands on another channel? Taranis x9d markm75 Radios 0 May 04, 2016 10:32 PM