rs2k / rf_lua_for_taranis

MIT License
5 stars 1 forks source link

Not compatible with taranis x7 #1

Open jmheist opened 7 years ago

jmheist commented 7 years ago

When ran on an X7, all I see on screen is "R"

jmheist commented 7 years ago

adding these (below) to the initui got the script started, but cant get passed '..center sticks to...' screen

radio=="taranisQx7" or radio=="taranisx7" or radio=="Qx7" or radio=="x7"

Not sure which one actually worked...

Also, screen size is 128x64, if thats needed (from http://www.open-tx.org/radios)

Tiny-Ty commented 7 years ago

local horizontalCharSpacing = 6 local verticalCharSpacing = 10

Change these lines of code to match above and it should work.

jmheist commented 7 years ago

sweet, ill test it out and submit a feature branch. thanks @Tiny-Ty

jmheist commented 7 years ago

@rs2k, @Tiny-Ty can I get access to the repo for branches? I started work to get the scritp workin on the x7. But still a no go. I see the message that tells me to center the sticks at the bottom, but cannot get it to recognize the stick inputs to get past that...

Here is the bit of code I added after the previous radio check: if radio=="taranisQx7" or radio=="taranisx7" or radio=="Qx7" or radio=="x7" then horizontalCharSpacing = 6 verticalCharSpacing = 10 end

rs2k commented 7 years ago

@jmheist Sure, are you in slack? We can talk about it there and then give you access. :)

You can go to raceflight.net/invite to join if not.

jmheist commented 7 years ago

Yep, as @veo

On Wed, Mar 22, 2017 at 11:53 AM rs2k notifications@github.com wrote:

@jmheist https://github.com/jmheist Sure, are you in slack? We can talk about it there and then give you access. :)

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/rs2k/rf_lua_for_taranis/issues/1#issuecomment-288464806, or mute the thread https://github.com/notifications/unsubscribe-auth/ANoxtgHMDoqDkdoAFCUfa8P9bSfd1WmPks5roVH0gaJpZM4MkmB4 .

MHessellund commented 7 years ago

BTW. I've sucessfully run the Script on my X7. I simply removed the version model check. I can say that the "radio" functions returns "X7" as model. I can see stick center, and execute the command to get to VTX menu. - I have a Tramp HV, so I cant test further as I do not have SmartAudio. I see no PID tuning, but I dont know if thats right or wrong.

local function InitUi(event) local ver, radio, maj, minor, rev = getVersion() horizontalCharSpacing = 6 verticalCharSpacing = 10 xyBuffer[0] = {} xyBuffer[0][0] = radio end

MHessellund commented 7 years ago

Update... PID's are also working.

See attached pics. dsc_0011 dsc_0012 dsc_0013 dsc_0014

Timmyd463229 commented 7 years ago

How do you remove the version model check

jmheist commented 7 years ago

@Timmyd463229 I got the script working on the x7... replace:

local ver, radio, maj, minor, rev = getVersion() if radio=="x9d" or radio=="x9d+" or radio=="taranisx9e" or radio=="taranisplus" or radio=="taranis" or radio=="x9d-simu" or radio=="x9d+-simu" or radio=="taranisx9e-simu" or radio=="taranisplus-simu" or radio=="taranis-simu" then horizontalCharSpacing = 6 verticalCharSpacing = 10 end xyBuffer[0] = {} xyBuffer[0][0] = "RaceFlight One Program Menu"

with:

local ver, radio, maj, minor, rev = getVersion() if radio=="x9d" or radio=="x9d+" or radio=="taranisx9e" or radio=="taranisplus" or radio=="taranis" or radio=="x9d-simu" or radio=="x9d+-simu" or radio=="taranisx9e-simu" or radio=="taranisplus-simu" or radio=="taranis-simu" then horizontalCharSpacing = 6 verticalCharSpacing = 10 end if radio=="taranisQx7" or radio=="taranisx7" or radio=="Qx7" or radio=="x7" or radio=="X7" then horizontalCharSpacing = 6 verticalCharSpacing = 10 xyBuffer[0] = {} xyBuffer[0][0] = radio else xyBuffer[0] = {} xyBuffer[0][0] = "RaceFlight One Program Menu" end

jmheist commented 7 years ago

make sure the indents get added

MHessellund commented 7 years ago

Notice that "RaceFlight One Program Menu" is to long a text to fit inside the X7 reduced screen size. It should be change to "RaceFlight One Menu" in general, or in the X7 model init.

rs2k commented 7 years ago

Does the rest of the menu work with the X7? I can change the output of the FC if not.

MHessellund commented 7 years ago

I've not been able to the VTX (Im using Tramp). But PID menu structure and size seem to work fully on the X7. The display is either 21 or 22 characters wide (from memory).

MHessellund commented 7 years ago

@jmheist The follow code needs to be changed: From: xyBuffer[0][0] = radio To: xyBuffer[0][0] = "RaceFlight One Menu"

And I think that you need to init the spacing in your ELSE:

else xyBuffer[0] = {} xyBuffer[0][0] = "RaceFlight One Program Menu" horizontalCharSpacing = 6 verticalCharSpacing = 10 end

jmheist commented 7 years ago

@MHessellund try this, I just cleaned up the code. There was no need to seperate the x7 from the x9. I shortened the menu title too...

https://github.com/rs2k/rf_lua_for_taranis/blob/feature/x7/SCRIPTS/TELEMTRY/rf.lua

techsavvyfpv commented 7 years ago

The PID and VTX menus work on my X7. The only issue is the word Menu being cut off because screen is smaller. I'll test the code posted by jmheist which should fix the issue.

jmheist commented 7 years ago

The updated code is on master now. I shorted the title

On Fri, Mar 24, 2017 at 2:07 PM, TechsavvyFPV notifications@github.com wrote:

The PID and VTX menus work on my X7. The only issue is the word Menu being cut off because screen is smaller. I'll test the code posted by jmheist which should fix the issue.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/rs2k/rf_lua_for_taranis/issues/1#issuecomment-289117273, or mute the thread https://github.com/notifications/unsubscribe-auth/ANoxtqj2PdWP0dlng3oIDdcGu5xgadlTks5rpBR_gaJpZM4MkmB4 .

MHessellund commented 7 years ago

@jmheist Sorry - Been away all weekend - but the code looks right now, havn't tested the committed script yet - but will soon :)

Perhaps a radio exception should be implementet, so that a visible arror shall be given when the script is run on an un supported radio? Eg.: else lcd.drawText(4*horizontalCharSpacing,5*verticalCharSpacing,"Unsupported radio", INVERS+BLINK) end