pandadoudou Posted December 3, 2016 Report Posted December 3, 2016 Hello everyone, Is it possible, via the FSUIPC UI to convert an output axis value to a percentage ? My axis ranges from -16K to 16K and I need to bind it to a LVar expecting a 0-100 value. I tried to set it as I've done with the throttle/prop/mixture but the result was kinda unexpected (visually the in game throttle just disappeared, woops !... and the behavior was erratic) Thank you in advance, don't hesitate if you need further information. Boris
Pete Dowson Posted December 4, 2016 Report Posted December 4, 2016 3 hours ago, pandadoudou said: Is it possible, via the FSUIPC UI to convert an output axis value to a percentage ? N0, not in the UI. You'd need to assign as usual, then edit the FSUIPC4.INI file to scale the entry in the Axis assignments section. To convert -16k to +16k to 0-100 you'd add something like /327.68,+50 because dividing by 327.68 gives you a range -50 to +50 and the addition of 50 rectifies it to 0-100. If the top result is 99 not 100 and you need 100 you may need to add 51 instead, depending on rounding, because the max on your original range will be +16387, not +16384. Pages 37-38 in the Advanced guide for FSUIPC4 covers scaling. Pete
pandadoudou Posted December 4, 2016 Author Report Posted December 4, 2016 Thank you Pete, The +50 axis offset is what I'm looking for. I'll be playing with the axis' range via the windows calibration to ensure the full 0-100 range. Boris
pandadoudou Posted December 4, 2016 Author Report Posted December 4, 2016 So, after some testing, It doesn't seem to make any difference. I also looked at the page 45 of "Advanced users" (37-38 wasn't so helpfull) Here is my axis line inside the FSUIPC4.ini : 8=2U,256,F,M1:9,0,0,0,/326.72,+50 -{ TO SIM: Macro 1_A2A_Comanche: L:Eng1_CarbHeatSwitch set }- May it be because in the UI axis assignment I selected "Send to FS as normal axis" instead of "Send direct to FSUIPC calibration" ? To have the full picture, here is the MCRO line I try to bind this axis to : 9=L:Eng1_CarbHeatSwitch=SET
Pete Dowson Posted December 4, 2016 Report Posted December 4, 2016 5 hours ago, pandadoudou said: I also looked at the page 45 of "Advanced users" (37-38 wasn't so helpfull) Here is my axis line inside the FSUIPC4.ini : 8=2U,256,F,M1:9,0,0,0,/326.72,+50 -{ TO SIM: Macro 1_A2A_Comanche: L:Eng1_CarbHeatSwitch set }- May it be because in the UI axis assignment I selected "Send to FS as normal axis" instead of "Send direct to FSUIPC calibration" ? That line is assigning some axis 2U to a macro. Calibration only applies to analog control axes which can be calibrated. 5 hours ago, pandadoudou said: To have the full picture, here is the MCRO line I try to bind this axis to : 9=L:Eng1_CarbHeatSwitch=SET So what values are sent? Pete
pandadoudou Posted December 4, 2016 Author Report Posted December 4, 2016 8 minutes ago, Pete Dowson said: That line is assigning some axis 2U to a macro. Calibration only applies to analog control axes which can be calibrated. So may I try another axis on my wiring board ? Here are the other axis from the .ini file : 0=AX,256,D,1,0,0,0 -{ DIRECT: Aileron }- 1=AY,256,D,2,0,0,0 -{ DIRECT: Elevator }- 2=BX,256,D,7,0,0,0 -{ DIRECT: LeftBrake }- 3=BY,256,D,8,0,0,0 -{ DIRECT: RightBrake }- 4=BR,256,D,3,0,0,0 -{ DIRECT: Rudder }- 5=CX,32,D,6,0,0,0 -{ DIRECT: Mixture }- 6=CY,8,D,4,0,0,0 -{ DIRECT: Throttle }- 7=CZ,8,D,5,0,0,0 -{ DIRECT: PropPitch }- 7 minutes ago, Pete Dowson said: So what values are sent? I didn't checked but it seems to have the exact same behavior as before. Boris
Pete Dowson Posted December 4, 2016 Report Posted December 4, 2016 (edited) 1 hour ago, Pete Dowson said: 8=2U,256,F,M1:9,0,0,0,/326.72,+50 There's a Lua plug-in supplied in your FSUIPC Documents folder called Log LVars, Assign it to a spare button or keypress and run it and see what values are taken on by that L:Var as you adjust your lever or slider. [LATER] sorry, I've only just realised. There's no / facility to divide. You can only multiply (*) and add (+). to divide you have to use the inverse. So in your case you really needed: *0.0030518,+50 Sorry. It was implemented long ago and my memory is aging fast these days. I should refer to my own documentation! Pete Edited December 4, 2016 by Pete Dowson
pandadoudou Posted December 4, 2016 Author Report Posted December 4, 2016 No probleme Pete ! ... FYI it is on page 45 of your own documentation (which is a pain to write, but even harder when someone tells you to read your own ! hehe) I'll try on these following days, I have another error with the module at FSX startup I need to investigate first... Thank you Boris
pandadoudou Posted December 19, 2016 Author Report Posted December 19, 2016 Sorry for the delay Pete. I finally had time to test it out. It worked with the following Axes parameter : Quote 8=2U,256,F,M1:9,0,0,0,*-0.0030518,+50 -{ TO SIM: Macro 1_A2A_Comanche: L:Eng1_CarbHeatSwitch set }- Thank you again ! Boris
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now