yaapu / FrskyTelemetryScript

A LUA telemetry script and widget for the Horus X10(S),X12 and Taranis X9D+,X9E,QX7 and X-Lite radios using ArduPilot frsky passthru protocol
GNU General Public License v3.0
435 stars 141 forks source link

Expose Flight Mode numeric value from ArduPilot MavLink to OpenTX #27

Closed JoshWelsh closed 4 years ago

JoshWelsh commented 5 years ago

Hey there.. we have a need to do a mix in the radio that is dependent on the ArduPlane Flight Mode numeric value. Is it possible to expose this to OpenTX from your widget as a sensor along with the others that you're exposing?

JoshWelsh commented 5 years ago

Hey Alessandro, thanks for asking, running a Horus.

On Jun 24, 2019, at 3:38 AM, Alessandro Apostoli notifications@github.com<mailto:notifications@github.com> wrote:

Hi Josh, sure it's an easy mod you can do yourself, what radio do you have?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://nam03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fyaapu%2FFrskyTelemetryScript%2Fissues%2F27%3Femail_source%3Dnotifications%26email_token%3DABLD4PN26N7W6HNEZAOPDVLP4CP35A5CNFSM4H22EUSKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYMQKLI%23issuecomment-504956205&data=02%7C01%7Cjosh%40joshco.us%7C5d953f2a940342fbb97c08d6f890284b%7C66a80cae9a51453283356eed78d28e07%7C1%7C0%7C636969695370800033&sdata=Ws9TXo3lGz%2BEDpm0lrk%2BkJOOSVPA8xFw11RlH7kbrz4%3D&reserved=0, or mute the threadhttps://nam03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FABLD4PNPRYEO47UEOGYEBQDP4CP35ANCNFSM4H22EUSA&data=02%7C01%7Cjosh%40joshco.us%7C5d953f2a940342fbb97c08d6f890284b%7C66a80cae9a51453283356eed78d28e07%7C1%7C0%7C636969695370810046&sdata=YiXQhW98f%2B974cYToj4AglpbpLFogGr0XuGNdsdQeUE%3D&reserved=0.

yaapu commented 5 years ago

Hi, add this line

setTelemetryValue(0x060F, 0, 2, telemetry.flightMode, 0 , 0 , "FMOD")

as last instruction of this function https://github.com/yaapu/FrskyTelemetryScript/blob/master/HORUS/SOURCES/PP/main.lua#L1173

and copy main.lua to the WIDGETS folder

cheers,

Alex.

JoshWelsh commented 5 years ago

Hi Alessandro,

I’ve done what you instructed here:

https://github.com/JoshWelsh/FrskyTelemetryScript/blob/1102effc825ebf4492e80fcf23b33ca55d7d8e81/HORUS/SOURCES/PP/main.lua#L1208

When I copied the file over, it reverted the widget back to 1.7.4 from 1.8rc2, whos main.lua appears to be binary? I think I may have just messed the whole thing up though, can you advise?

From: Alessandro Apostoli notifications@github.com Sent: Monday, June 24, 2019 9:22 AM To: yaapu/FrskyTelemetryScript FrskyTelemetryScript@noreply.github.com Cc: Josh Welsh Josh@joshco.us; Author author@noreply.github.com Subject: Re: [yaapu/FrskyTelemetryScript] Expose Flight Mode numeric value from ArduPilot MavLink to OpenTX (#27)

Hi, add this line

setTelemetryValue(0x060F, 0, 2, telemetry.flightMode, 0 , 0 , "FMOD")

as last instruction of this function https://github.com/yaapu/FrskyTelemetryScript/blob/master/HORUS/SOURCES/PP/main.lua#L1173https://nam03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fyaapu%2FFrskyTelemetryScript%2Fblob%2Fmaster%2FHORUS%2FSOURCES%2FPP%2Fmain.lua%23L1173&data=02%7C01%7Cjosh%40joshco.us%7C28127854d9a246c02a4e08d6f8c00992%7C66a80cae9a51453283356eed78d28e07%7C1%7C0%7C636969901020653158&sdata=d0fuSH3HGiOKkMQ%2FuRxVH952VYqNVnEInwTKkZJPr5E%3D&reserved=0

and copy main.lua to the WIDGETS folder

cheers,

Alex.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://nam03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fyaapu%2FFrskyTelemetryScript%2Fissues%2F27%3Femail_source%3Dnotifications%26email_token%3DABLD4PNU6NMNJQJLMCUZLK3P4DYBDA5CNFSM4H22EUSKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYNOXJA%23issuecomment-505080740&data=02%7C01%7Cjosh%40joshco.us%7C28127854d9a246c02a4e08d6f8c00992%7C66a80cae9a51453283356eed78d28e07%7C1%7C0%7C636969901020663166&sdata=GHZdrZJ%2BfPRKfX70Fw7LuLCVv2P46JJS2XGA4UDAOww%3D&reserved=0, or mute the threadhttps://nam03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FABLD4PJUE5BXLVARDTMYQSDP4DYBDANCNFSM4H22EUSA&data=02%7C01%7Cjosh%40joshco.us%7C28127854d9a246c02a4e08d6f8c00992%7C66a80cae9a51453283356eed78d28e07%7C1%7C0%7C636969901020673174&sdata=76EimV8aKCiEmv14A5mcp8dY1rc%2FZiqAJlq1FtmRKqg%3D&reserved=0.

yaapu commented 5 years ago

mhmm my fault, should have told you it was based on 1.7.x, try this patched 1.8.0 version and copy it to the widgets/yaapy folder

yaapu_widget.zip

JoshWelsh commented 5 years ago

My apologies sir, I should have been more clear. Thank you for this, will try it later today and report back.

On Jun 25, 2019, at 4:34 AM, Alessandro Apostoli notifications@github.com<mailto:notifications@github.com> wrote:

mhmm my fault, you have told you it was based on 1.7.x, try this patched version anc copy it to the widgets/yaapy/folder

yaapu_widget.ziphttps://nam03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fyaapu%2FFrskyTelemetryScript%2Ffiles%2F3325007%2Fyaapu_widget.zip&data=02%7C01%7Cjosh%40joshco.us%7C9e36c37d02a1467e741908d6f9611504%7C66a80cae9a51453283356eed78d28e07%7C1%7C0%7C636970592699341768&sdata=aSeU4DBNDykrulk5tDmRubzcKMT2EDCbHxFkseUHNdM%3D&reserved=0

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://nam03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fyaapu%2FFrskyTelemetryScript%2Fissues%2F27%3Femail_source%3Dnotifications%26email_token%3DABLD4PJXSIZGVNTJRINPO2LP4H7EHA5CNFSM4H22EUSKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYP545Q%23issuecomment-505405046&data=02%7C01%7Cjosh%40joshco.us%7C9e36c37d02a1467e741908d6f9611504%7C66a80cae9a51453283356eed78d28e07%7C1%7C0%7C636970592699341768&sdata=I%2BXtxN2rQhymZU0ddGw%2FYvk%2FzcYk4hpL8aqqqSqAC7Y%3D&reserved=0, or mute the threadhttps://nam03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FABLD4PORMDCPUHGD7CQFO7TP4H7EHANCNFSM4H22EUSA&data=02%7C01%7Cjosh%40joshco.us%7C9e36c37d02a1467e741908d6f9611504%7C66a80cae9a51453283356eed78d28e07%7C1%7C0%7C636970592699351767&sdata=cYv%2FN95F3mGP0%2Fhhj4UvVrt8Zq6AR86B8Z2DTJsXJH4%3D&reserved=0.

yaapu commented 4 years ago

Josh I'm closing this, if you need more help open a new issue!