505Northman Posted June 8, 2022 Report Posted June 8, 2022 (edited) Hello! I'm having issues with setting up my throttles in the HondaJet that recently came out on May 31st, 2022. The aircraft requires you to use LVARs to assign the throttle through FSUIPC. The normal calibration options do not work for this aircraft. I was attempting to set one of these using two offsets but it was not working as each time I tried to move the throttle, it would just put it to 100% after moving it even slightly and would only idle at the very furthest extent of my throttle. Moving it to any other position other than the furthest extent causes it to put the throttle in the simulator to 100%. The throttles function normally when using the in simulator controls rather than interfacing through FSUIPC. I've assigned A000 for the left throttle and A001 for the right throttle. I attempted to use this forum post as a guideline for myself to understand how to do this as I am quite new to using FSUIPC and don't know how to use it as an advanced user. FSUIPC7.ini FSUIPC7.log List of LVARs I'd really appreciate any help with why this is happening as I can't use FSUIPC to control the throttles in this aircraft. Edited June 8, 2022 by 505Northman
John Dowson Posted June 9, 2022 Report Posted June 9, 2022 (edited) On 6/8/2022 at 9:42 AM, 505Northman said: he aircraft requires you to use LVARs to assign the throttle through FSUIPC. Ok, but which lvars? Looking at your ini, you have assigned to lvars THROTTLE1_SET and THROTTLE2_SET as single bytes: Quote [LvarOffsets.HA420] 1=L:THROTTLE1_SET=UB0xA000 2=L:THROTTLE2_SET=UB0xA001 What is the range that those lvars accept? Unless its only 0-255, you should increase the size to 2 bytes (UW) or 4 bytes (UD). And if they accept negative values, then they also need to be signed. And your assignments are just setting the axis value, with no scaling: Quote [Axes.HA420] RangeRepeatRate=10 0=AU,2,F,x0100A000,0,0,0 -{ FSUIPC: offset byte set, offset A000 }- 1=AV,2,F,x0100A001,0,0,0 -{ FSUIPC: offset byte set, offset A001 }- as the raw axis value will range from either 0 - 16383 or -16283 - + 16383, you will need to scale the axis value to fit in a single byte. That is explained in the post you referenced. To set this up, first determine the range of values that those lvars hold/accept, and size the offsets accordingly. Then assign your axis to those offsets with the correct control for the size of the offset. You may then need to add additional scaling depending upon the values received and the values expected - to do this, see the section on scaling input axes values on P41 of the Advanced User guide. John Later: also please update to the latest FSUIPC7 version, v7.3.6. You are using 7.3.3, and only the latest version is supported. Edited June 9, 2022 by John Dowson Later added
505Northman Posted June 9, 2022 Author Report Posted June 9, 2022 Hi John and thank you for your response. 1 hour ago, John Dowson said: Ok, but which lvars? Looking at your ini, you have assigned to lvars THROTTLE1_SET and THROTTLE2_SET as single bytes: The LVARs are indeed THROTTLE1_SET and THROTTLE2_SET as those are the two that are used for throttle control and using the regular FS Controls produces no throttle movement. I've also confirmed this by looking in the Discord server pertaining to the aircraft that LVARs are the only way to control the throttles for this aircraft through external means. 1 hour ago, John Dowson said: What is the range that those lvars accept? Unless its only 0-255, you should increase the size to 2 bytes (UW) or 4 bytes (UD). And if they accept negative values, then they also need to be signed. I am not exactly sure what range the LVARs accept. How might I be able to determine this? I've also gone ahead and updated to the latest version of FSUIPC7.
John Dowson Posted June 9, 2022 Report Posted June 9, 2022 38 minutes ago, 505Northman said: I am not exactly sure what range the LVARs accept. How might I be able to determine this? Do those lvar values change as you apply thrust? If so, you could try logging the lvar values for min/max thrust to see what values they hold. Otherwise, I would expect that they would duplicate/pass through the value to the standard Throttle Set control, which expects a range from 0 - 16383. If so, you would need to store as a 2byte unsigned word (UW) and assign to the Offset Word control. If the axis you aree assigning has a range of 0-16383 then no scaling is necessary, otherwise you would also need to scale, depending on the axis input values (which you can see in the axis assignment panel). John
John Dowson Posted June 9, 2022 Report Posted June 9, 2022 One other useful testing technique is to use the Add-ons->WASM->Set Lvar... menu item - you can use that to set the lvar to different values and see how the throttle behaves - for example, try setting L:THROTTLE1_SET to 16383, and see if that moves the throttle 1 to full throttle, then try 8192 and see if that is 50% throttle...
505Northman Posted June 9, 2022 Author Report Posted June 9, 2022 Hi John and thanks again for the help. I used your tip to use Set Lvar to figure out the range the LVAR accepts. The range is apparently from -1 to 1, where -1 represents a cutoff for the engines, 0 represents idle position, and 1 represents a full 100% throttle application. So the range is indeed -1 to 1. Setting the value to 0.5 will make it stay in the 50% power position. How would I now go from getting my throttle range of 16383 to fit into this range? Many thanks again for the support. Edit: I've seen page 41 of the advanced user guide. I'll have to do some math it seems to figure out so I'll get to doing that.
John Dowson Posted June 9, 2022 Report Posted June 9, 2022 50 minutes ago, 505Northman said: The range is apparently from -1 to 1, where -1 represents a cutoff for the engines, 0 represents idle position, and 1 represents a full 100% throttle application. So the range is indeed -1 to 1. Setting the value to 0.5 will make it stay in the 50% power position. Ok, so then it is not an integer and you should use a 4-byte floating point number, e.g. [LvarOffsets.HA420] 1=L:THROTTLE1_SET=F0xA000 2=L:THROTTLE2_SET=F0xA004 and use/assign to the Offset Float32 Set/1000 control. Then, depending on the input axis values max/min, you would then need to add scaling (via editing the FSUIPC7.ini) to convert the numbers to the -1 to + 1 range. So, if the input range was -16383 to +16383, the Offset Float32 Set/1000 control will output -16.383 to +16.383. To scale that to a range of -1 to +1, you would need to multiply by 1/16.383, ie. use a scaling factor of *0.06103888176. If the input range is 0-16383, you would also need to subtract to get the negative range, and also scale by 1/8.192, which would be a scaling factor of *0.1220703125,-1 (as the multiplication must come first).
John Dowson Posted June 9, 2022 Report Posted June 9, 2022 ...of course, there will be added complications if you dont want to use the -1 to 0 range to control reverse thrust... Maybe better to calibrate only for the 0-1 range for forward thrust, and if you have a detent button in the thrust axis for reverse you can assign that to set a value of -1 to activate reversers... Otherwise, you can assign your axis to write the axis value to an offset but not use the lvar offsets, but use a lua script to get the offset value (using event.offset) and then scale/adjust the value accordingly and set the lvar value in the lua script....
505Northman Posted June 9, 2022 Author Report Posted June 9, 2022 Okay so it has worked by using those options and I do have movement of the throttle. My only issue is how I would be able to move the point where it is at 0. I have detents on my throttle that I use for DCS which work as a reverse thrust for MSFS. It isn't on exact 0 however and lays at 14300 (my range goes from 0% at 16384 to 100% at -16384 so it's inverted). Is there a way to shift this 0 point or set a new center at a specific value?
John Dowson Posted June 9, 2022 Report Posted June 9, 2022 11 minutes ago, 505Northman said: It isn't on exact 0 however and lays at 14300 (my range goes from 0% at 16384 to 100% at -16384 so it's inverted). Is there a way to shift this 0 point or set a new center at a specific value? Yes - you can add/subtract a number to the scaled value to shift the centre position... however, that will also shift the max/min values being outputted. It sounds like you want the input values from 16384 to 14300 to be scaled to -1 to 0, and for values 14300 to -16384 to be scaled to 0 to 1. That is not possible (i.e. separate scaling for +ve and -ve vales) using axis scaling - you would have to write a lua script. You could try just adding to the scaled value to shift the centre. This would, however, give a value > +1 for max thrust (effectively reducing the +ve thrust range and making it more sensitive) and won't reach -1 for reverse thrust, but may be useable. So if you are currently using a scaling factor of *-0.06103888176 (you don't say!), you could try *-0.06103888176,+0.872856. It may be better to change the scaling for the positive thrust only, and so use *-0.0326115,+0.4663 - that should give you a full forward thrust range between 14300 and -16384, but would only give a small negative thrust range when between 14300 and 16384. You could maybe also try explicitly setting a lower value when entering the reverse range using the right hand side of the axis assignment dialog... But for proper control (with appropriate scaling for forward/reverse thrust), you would need to use a lua script.
505Northman Posted June 9, 2022 Author Report Posted June 9, 2022 This seems to be the best solution as of right now as I don't know much about Lua so I'll stick with it. Thanks again for your assistance and this inquiry can be considered resolved.
John Dowson Posted June 10, 2022 Report Posted June 10, 2022 9 hours ago, 505Northman said: This seems to be the best solution as of right now as I don't know much about Lua so I'll stick with it. Ok, but maybe you could post the solution you used ai that it can help others which have this aircraft. 1
zfehr Posted June 18, 2022 Report Posted June 18, 2022 On 6/9/2022 at 11:27 PM, John Dowson said: Ok, but maybe you could post the solution you used ai that it can help others which have this aircraft. I would love to know the solution cause I haven't been able to fly the Hondajet since purchasing it. I use an older serial PFC Cirrus II which has a dll file to make its input readable in FSUIPC which then allows me to use MSFS with all other aircraft.
John Dowson Posted June 19, 2022 Report Posted June 19, 2022 Presumably the solution indicated above, i.e. by assigning the throttle lvars to offset, assigning your axes to those same offsets, and then scaling correctly. It is the actual scaling that @505Northman used that is missing as I gave several options...maybe he could respond... Otherwise, try setting up as detailed in this post and try the various scalings I provided to see which work... John
zfehr Posted July 20, 2022 Report Posted July 20, 2022 On 6/9/2022 at 6:21 AM, John Dowson said: Ok, so then it is not an integer and you should use a 4-byte floating point number, e.g. [LvarOffsets.HA420] 1=L:THROTTLE1_SET=F0xA000 2=L:THROTTLE2_SET=F0xA004 and use/assign to the Offset Float32 Set/1000 control. Then, depending on the input axis values max/min, you would then need to add scaling (via editing the FSUIPC7.ini) to convert the numbers to the -1 to + 1 range. So, if the input range was -16383 to +16383, the Offset Float32 Set/1000 control will output -16.383 to +16.383. To scale that to a range of -1 to +1, you would need to multiply by 1/16.383, ie. use a scaling factor of *0.06103888176. If the input range is 0-16383, you would also need to subtract to get the negative range, and also scale by 1/8.192, which would be a scaling factor of *0.1220703125,-1 (as the multiplication must come first). Hi John. I have input this text in the FSUIPC.ini file and then set the throttle1 and throttle2 to the offset and then edited the ini file again with the scaling factor referenced. Not sure if I am doing it right or wrong but I do get the throttle to work somewhat now. Full throttle is TO power, pull back the levers and there is a lot of "noise" making them jump around and if I pull back far enough I do get idle power and then shutoff. Not a usable implementation unless I want a toggle between TO power, Idle and shutoff. When I re open the ini file the scaling factor has reverted to 0.0000000. I have included the * and also tried without. I also tried inputting the two scaling factors referenced in a later answer from Northman changing the positive and negative signing but that didn't seem to work any different.
John Dowson Posted July 20, 2022 Report Posted July 20, 2022 (edited) 10 hours ago, zfehr said: When I re open the ini file the scaling factor has reverted to 0.0000000. This should certainly not happen...are you changing this while FSUIPC7 is running? Any changes to the FSUIPC7.ini file should either be made when FSUIPC7 is not running, or if it is running then you should have the axis assignment UI panel open when making these changes, and when the changes saved you should click the 'Reload all assignments' button. 10 hours ago, zfehr said: I have included the * and also tried without. I also tried inputting the two scaling factors referenced in a later answer from Northman changing the positive and negative signing but that didn't seem to work any different. If that makes no difference, then you are certainly doing something wrong. Before you assign the throttle, I suggest you try logging the offset/lvar values to make sure they are as expected. You can do this using the Log->Offsets... menu option, entering the offsets A000 and A004 both as type FLT32. I also recommend that you activate logging for Axis Controls. Then move the throttle in the cockpit UI through its full range. You can do thus with the logging console open (Log->Open Console) to view the messages in real-time If you see any throttle axis events logged, you should use those rather than the lvars. If no such events are logged, check that the offset/lvar values are in the expected range. You should also make a note of the values you see for the different throttle positions. As discussed earlier in this thread, it looks as if the relationship between the lvar values and the throttle position is not linear. This implies that you cannot use just one scaling value and get your controller throttle position to match that of the aircraft. To do that, you would need a lua script to receive your axis values (via offsets), apply calibration/scaling based upon that value, and then set the lvar values to this scaled/calibrated value. If you don't want to use lua, then you need to use the axis scaling method (as previously discussed) to get a response that you can use/lice with. You can start with the values previously mentioned, If you have any further questions, please also attach your FSUIPC7.ini as well as your FSUIPC7.log file with the above offset logging enabled. John Later: if using lvars to control the throttle, you should also change the lvar update frequency in the WASM. This defaults to 6Hz, but you should change this to Frame or VisualFrame to get faster updates if using to control an axis. You should set this in a FSUIPC_WASM.ini file in the WASM persistent storage area - see the Advanced User guide for details. Note that this file will not exist in that location by default - copy the one from your Community folder to your WASM persistent storage area and then update it. Edited July 20, 2022 by John Dowson Later added
zfehr Posted July 21, 2022 Report Posted July 21, 2022 Thank you John. I finally did get it working and am happy to share. My hardware is a serial port PFC Cirrus II BATD using the PFCcom64 driver to deliver the inputs to FSUIPC7. What ended up working are the following entries in the FSUIPC7.ini file: [Profile.HA420] 1=HJET HA420 Red [LvarOffsets.HA420] 1=L:THROTTLE1_SET=F0xA000 2=L:THROTTLE2_SET=F0xA004 [Axes.HA420] RangeRepeatRate=10 0=17X,1,F,x7000A000,0,0,0,*0.06103888 -{ FSUIPC: offset float32 set/1000, offset A000 (0.000000) }- 1=17Y,516,F,x7000A004,0,0,0,*0.06103888 -{ FSUIPC: offset float32 set/1000, offset A004 (0.000000) }- I did have to manually edit the .ini file with the LvarOffsets (lines 3-5), and add the ",*0.06103888" after the "0,0,0" on lines 8-9 I also edited the WASM file you instructed and set to "VisualFrame" instead of the default 6Hz. Have made two flights so far and it is nice to have the throttle levers working. I will note that the visual representation of movement does not work in the VC so the cockpit looks like the throttle levers remain in their idle position, but the EICAS area on the MFD register the throttle lever position and percentage readouts as well as the "TO, MCT, and Idle" indicators. The VC throttles not moving is a MSFS bug which is also present in the TBM930. 1
John Dowson Posted July 21, 2022 Report Posted July 21, 2022 4 minutes ago, zfehr said: Have made two flights so far and it is nice to have the throttle levers working. Good to hear - thanks for the update and the configuration details. 5 minutes ago, zfehr said: I will note that the visual representation of movement does not work in the VC so the cockpit looks like the throttle levers remain in their idle position, but the EICAS area on the MFD register the throttle lever position and percentage readouts as well as the "TO, MCT, and Idle" indicators. It looks like something other than the lvars need updating. I am surprised that there is not a control, standard or custom, that cannot be used for this - hopefully this will be addressed in a future aircraft update. 7 minutes ago, zfehr said: The VC throttles not moving is a MSFS bug which is also present in the TBM930. I remember issues with the throttle un the TBM930 but I thought they had been resolved (or maybe that was with using a mod...). I'll check this one (as I have access) next week and let you know. 10 minutes ago, zfehr said: I also edited the WASM file you instructed and set to "VisualFrame" instead of the default 6Hz. Make sure this change is in the WASM persistent storage area, and not un the FSUIPC_WASM.ini located under the Community\fsuipc-lvar-module folder as that will get overwritten the next time you update FSUIPC7. John
Dreamflight767 Posted August 26, 2022 Report Posted August 26, 2022 Hi: I too am having issues w/ FSUIPC and the Hjet. I'm trying to follow this thread but I don't understand. I'm not good at this stuff at all. I'm using the Bravo throttle quadrant. Thanks. FSUIPC7.ini
John Dowson Posted August 26, 2022 Report Posted August 26, 2022 9 hours ago, Dreamflight767 said: I too am having issues w/ FSUIPC and the Hjet. I'm trying to follow this thread but I don't understand. What issues - throttle issues I presume... Looking at your FSUIPC7.ini, you have not tried anything mentioned in this thread... The first thing you should do is create an FSUIPC profile for the Hjet. You will be asked if you want to import the axes to this new profile - you should click 'yes' to accept this. Once the profile is created, exit FSUIPC7 and open your FSUIPC7.ini in an editor. Then remove the following assignments (highlighted in bold) from the [Axes.Hjet] section (or the [Axes.xxx] section where xxx is the name of your Hjet profile): Quote 0=AR,256,D,36,0,0,0 -{ DIRECT: SteeringTiller }- 1=BX,256,F,67359,0,0,0 -{ TO SIM: CONDITION_LEVER_SET }- 2=BY,256,F,22,0,0,0 -{ TO SIM: Custom control: <22> }- 3=BZ,256,D,6,0,0,0 -{ DIRECT: Mixture }- 4=BR,256,D,9,11,0,0 -{ DIRECT: Throttle1, Throttle3 }- 5=BU,256,D,5,0,0,0 -{ DIRECT: PropPitch }- 6=BV,256,D,10,12,0,0 -{ DIRECT: Throttle2, Throttle4 }- 7=CX,256,D,1,0,0,0 -{ DIRECT: Aileron }- 8=CY,256,D,2,0,0,0 -{ DIRECT: Elevator }- 9=EX,256,D,7,0,0,0 -{ DIRECT: LeftBrake }- 10=EY,256,D,8,0,0,0 -{ DIRECT: RightBrake }- 11=ER,256,D,3,0,0,0 -{ DIRECT: Rudder }- Then add the following section: Quote [LvarOffsets.Hjet] 1=L:THROTTLE1_SET=F0xA000 2=L:THROTTLE2_SET=F0xA004 (replacing Hjet with the name of your Hjet profile). This will map the throttle lvars to FSUIPC offsets. You can then assign your throttle axis to those offsets, which will update the offsets when you move the assigned axis, which in turn will update the throttle lvar values. You can then add appropriate scaling of the values, as the range of the lvars is -1 to +1, whereas the range of your axes values will be -16383 to +16384... if you don't know how to do that, maybe just start by adding the following lines to your [Axes.Hjet] section and we can take it from there: Quote 12=BR,256,F,x7000A000,0,0,0,*0.06103888 -{ FSUIPC: offset float32 set/1000, offset A000 (0.000000) }- 13=BV,256,F,x7000A004,0,0,0,*0.06103888 -{ FSUIPC: offset float32 set/1000, offset A004 (0.000000) }- Try that, and any issues please attach your updated FSUIPC7.ini as well as your FSUIPC7.log file. Note that when using lvars for axes assignments, it is a good idea to increase the lvar update frequency by changing/setting the WASM ini parameter LvarUpdateFrequency - this is described above and in the Advanced User guide. John
Dreamflight767 Posted August 26, 2022 Report Posted August 26, 2022 4 hours ago, John Dowson said: What issues - throttle issues I presume... Looking at your FSUIPC7.ini, you have not tried anything mentioned in this thread... The first thing you should do is create an FSUIPC profile for the Hjet. You will be asked if you want to import the axes to this new profile - you should click 'yes' to accept this. Once the profile is created, exit FSUIPC7 and open your FSUIPC7.ini in an editor. Then remove the following assignments (highlighted in bold) from the [Axes.Hjet] section (or the [Axes.xxx] section where xxx is the name of your Hjet profile): Then add the following section: (replacing Hjet with the name of your Hjet profile). This will map the throttle lvars to FSUIPC offsets. You can then assign your throttle axis to those offsets, which will update the offsets when you move the assigned axis, which in turn will update the throttle lvar values. You can then add appropriate scaling of the values, as the range of the lvars is -1 to +1, whereas the range of your axes values will be -16383 to +16384... if you don't know how to do that, maybe just start by adding the following lines to your [Axes.Hjet] section and we can take it from there: Try that, and any issues please attach your updated FSUIPC7.ini as well as your FSUIPC7.log file. Note that when using lvars for axes assignments, it is a good idea to increase the lvar update frequency by changing/setting the WASM ini parameter LvarUpdateFrequency - this is described above and in the Advanced User guide. John Thanks John! That's what I needed, step-by-step instructions. One of these days, I'm going to get the hang of this.
pilotjohn Posted December 27, 2022 Report Posted December 27, 2022 Is this fully working for everyone? I configured it and it appears to do what it expected ... Logging A000 shows the correct axis positions (-1 to 1) Listing lvars and looking at THROTTLE<N>_SET shows the value written The message panel in the aircraft shows a T/O config warning when throttle is advanced But I have to move the throttle out of cut-off first, otherwise: Throttles don't move No indication changes in the thrust display Engines don't spool up Has anyone made the cut-off to idle work in the 0 to -16384 range?
John Dowson Posted January 2, 2023 Report Posted January 2, 2023 Not having this aircraft, I can only advise to use the logging facilities to see if any event or lvar change is registered when you move the throttle out of cut-off, and if so try and use that,,, Note also that there are now quite a few presets available for the HJet, including HA420 Throttle 1 Set and HA420 Throttle 2 Set, so you could try those. John
ark1320 Posted January 6, 2023 Report Posted January 6, 2023 In case it helps anyone, here's what I came up with for the HJet throttles. I currently just use one axis to control both engines , but the below can easily be expanded to use two axis levers for those so motivated. This solution makes use of three tiny Lua scripts. The Saitek controller throttle axis value is stored in offset 0xA000. If the value changes by at least a magnitude of 128 the function HJet_Throttle() is called to convert the raw axis value to a number between 0 and 1, and this number is written to the two HJet Lvars that control its throttles. This script is loaded automatically when FSUIPC starts through the FSUIPC7.ini Profil Specific file entry that looks like this: [Auto.HJet] 1=Lua HJet_Throttle This is the main script that gets loaded automatically: -- HJet_Throttle.lua function HJet_throttle() throttle = (ipc.axis("T","X") + 16384)/32587 -- need throttle range of 0 to 1 for TQ throttle axis range of -16384 to +16203 ipc.writeLvar("L:THROTTLE1_SET", throttle) ipc.writeLvar("L:THROTTLE2_SET", throttle) end --******************************************** --********* Main Program ******************** --******************************************** ipc.writeLvar("L:THROTTLE1_SET", 0) -- initialize throttles to idle position. ipc.writeLvar("L:THROTTLE2_SET", 0) ipc.writeLvar("L:HA420_ThrottlePos_R", 50) ipc.writeLvar("L:HA420_ThrottlePos_L", 50) event.offsetmask(0xA000, 0xFF80, "SW", "HJet_throttle") -- mask requires a change of at least 128 to trigger the function call. -- Under FSUJIPC7 Axis Assignments, the HJet throttle axis vale has been -- assigned to Offset 0xA000 as Offset Word Set The two tiny scripts below move the HJet throttles between cutoff and idle. There is switch at the bottom of my Saitek throttle axis. When the switch is closed by moving the lever down into the switch, HjetThrotCuttoff.lua is called, and when the lever is moved up out of the switch position HjetThrotIdle.lua is called. --HjetThrotCuttoff.lua ipc.writeLvar("L:THROTTLE1_SET", -1) ipc.writeLvar("L:THROTTLE2_SET", -1) ipc.writeLvar("L:HA420_ThrottlePos_R", 0) ipc.writeLvar("L:HA420_ThrottlePos_L", 0) --HjetThrotIdle.lua ipc.writeLvar("L:THROTTLE1_SET", 0) ipc.writeLvar("L:THROTTLE2_SET", 0) ipc.writeLvar("L:HA420_ThrottlePos_R", 50) ipc.writeLvar("L:HA420_ThrottlePos_L", 50) Frankly, whether or not all the above is a "good" solution for the HJet throttles I don't know. I'm new to the HJet and I'm not sure I fully understand how its throttles work. But the above solution does seem to work OK. And of course, this solution is HJet Profile Specific. Al HJetThrotCutoff.lua HJet_Throttle.lua HjetThrotIdle.lua 1
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