chrisal Posted March 17, 2021 Report Posted March 17, 2021 Hi Can FSUIPC be used with the new Aerosoft CRJ for MSFS? Having set it up for other aircraft and "turned off" the in-built MSFS Control, I really don't want to abandon this set-up just fly this new aircraft! It seems particularly the throttle from what I read elsewhere. Cheers Chris
jaxx Posted March 17, 2021 Report Posted March 17, 2021 The throttles need a bit of a workaround, as most simple solutions like going through FSUIPC calibration don't work (e.g. using FSUIPC calibration will control the engine throttle somehow, but the throttle lever will not move and the CRJ detent calibration does not work either). From what I tried the only thing that works correctly is the controls "Throttle1 Axis Set Ex1" (67103) and "Throttle2 Axis Set Ex1" (67110) (have not found much documentation on those control numbers, seems they were used for something completely different in FSX/P3D). But when you for example use "Send to FS as normal axis" to "Throttle1 Axis Set Ex1", the axis is still reversed and FSUIPC seems to only support reversing when using FSUIPC calibration. So my solution is to send the axis to a user offset and then map the reverse of that offset to the control with LUA. With that I have working levers and the CRJ detent calibration also works: FSUIPC.ini (CRJ specific parts only): [LuaFiles] LuaPath=lua 1=CRJ [Profile.CRJ] 1=CRJ [Auto.CRJ] 1=Lua CRJ [Axes.CRJ] RangeRepeatRate=10 0=BR,32,F,x020066C0,0,0,0 -{ FSUIPC: offset word set, offset 66C0 }- 1=BV,32,F,x020066C2,0,0,0 -{ FSUIPC: offset word set, offset 66C2 }- CRJ.lua: -- init throttle at idle on startup ipc.writeSW(0x66C0, 16383) ipc.writeSW(0x66C2, 16383) function throttle_1(offset, value) -- 67103: Throttle1 Axis Set Ex1 ipc.control(67103, (-1) - value) end function throttle_2(offset, value) -- 67110: Throttle2 Axis Set Ex1 ipc.control(67110, (-1) - value) end event.offset(0x66C0, "SW", "throttle_1") event.offset(0x66C2, "SW", "throttle_2")
John Dowson Posted March 17, 2021 Report Posted March 17, 2021 1 hour ago, chrisal said: Can FSUIPC be used with the new Aerosoft CRJ for MSFS? I don't see any reason why you can't, but you need to try it. There are various ways to configure the throttle, one of them should work... Ah, I see @jaxx has replied - thanks! 14 minutes ago, jaxx said: From what I tried the only thing that works correctly is the controls "Throttle1 Axis Set Ex1" (67103) and "Throttle2 Axis Set Ex1" (67110) (have not found much documentation on those control numbers, seems they were used for something completely different in FSX/P3D). As far as I'm aware, these are new controls added by MSFS. There are various "Ex1" controls, here's the full list : // Additional controls from Asobo forum: https://forums.flightsimulator.com/t/simconnect-mega-thread/116305/62 #define KEY_THROTTLE_AXIS_SET_EX1 (KEY_ID_MIN + 1560) #define KEY_THROTTLE_INCREASE_EX1 (KEY_ID_MIN + 1561) #define KEY_THROTTLE_INCREASE_SMALL_EX1 (KEY_ID_MIN + 1562) #define KEY_THROTTLE_DECREASE_EX1 (KEY_ID_MIN + 1563) #define KEY_THROTTLE_DECREASE_SMALL_EX1 (KEY_ID_MIN + 1564) #define KEY_THROTTLE_FULL_EX1 (KEY_ID_MIN + 1565) #define KEY_THROTTLE_CUT_EX1 (KEY_ID_MIN + 1566) #define KEY_THROTTLE1_AXIS_SET_EX1 (KEY_ID_MIN + 1567) #define KEY_THROTTLE1_INCREASE_EX1 (KEY_ID_MIN + 1568) #define KEY_THROTTLE1_INCREASE_SMALL_EX1 (KEY_ID_MIN + 1569) #define KEY_THROTTLE1_DECREASE_EX1 (KEY_ID_MIN + 1570) #define KEY_THROTTLE1_DECREASE_SMALL_EX1 (KEY_ID_MIN + 1571) #define KEY_THROTTLE1_FULL_EX1 (KEY_ID_MIN + 1572) #define KEY_THROTTLE1_CUT_EX1 (KEY_ID_MIN + 1573) #define KEY_THROTTLE2_AXIS_SET_EX1 (KEY_ID_MIN + 1574) #define KEY_THROTTLE2_INCREASE_EX1 (KEY_ID_MIN + 1575) #define KEY_THROTTLE2_INCREASE_SMALL_EX1 (KEY_ID_MIN + 1576) #define KEY_THROTTLE2_DECREASE_EX1 (KEY_ID_MIN + 1577) #define KEY_THROTTLE2_DECREASE_SMALL_EX1 (KEY_ID_MIN + 1578) #define KEY_THROTTLE2_FULL_EX1 (KEY_ID_MIN + 1579) #define KEY_THROTTLE2_CUT_EX1 (KEY_ID_MIN + 1580) #define KEY_THROTTLE3_AXIS_SET_EX1 (KEY_ID_MIN + 1581) #define KEY_THROTTLE3_INCREASE_EX1 (KEY_ID_MIN + 1582) #define KEY_THROTTLE3_INCREASE_SMALL_EX1 (KEY_ID_MIN + 1583) #define KEY_THROTTLE3_DECREASE_EX1 (KEY_ID_MIN + 1584) #define KEY_THROTTLE3_DECREASE_SMALL_EX1 (KEY_ID_MIN + 1585) #define KEY_THROTTLE3_FULL_EX1 (KEY_ID_MIN + 1586) #define KEY_THROTTLE3_CUT_EX1 (KEY_ID_MIN + 1587) #define KEY_THROTTLE4_AXIS_SET_EX1 (KEY_ID_MIN + 1588) #define KEY_THROTTLE4_INCREASE_EX1 (KEY_ID_MIN + 1589) #define KEY_THROTTLE4_INCREASE_SMALL_EX1 (KEY_ID_MIN + 1590) #define KEY_THROTTLE4_DECREASE_EX1 (KEY_ID_MIN + 1591) #define KEY_THROTTLE4_DECREASE_SMALL_EX1 (KEY_ID_MIN + 1592) #define KEY_THROTTLE4_FULL_EX1 (KEY_ID_MIN + 1593) #define KEY_THROTTLE4_CUT_EX1 (KEY_ID_MIN + 1594) #define KEY_PROP_PITCH_AXIS_SET_EX1 (KEY_ID_MIN + 1595) #define KEY_PROP_PITCH_INCREASE_EX1 (KEY_ID_MIN + 1596) #define KEY_PROP_PITCH_INCREASE_SMALL_EX1 (KEY_ID_MIN + 1597) #define KEY_PROP_PITCH_DECREASE_EX1 (KEY_ID_MIN + 1598) #define KEY_PROP_PITCH_DECREASE_SMALL_EX1 (KEY_ID_MIN + 1599) #define KEY_PROP_PITCH_LO_EX1 (KEY_ID_MIN + 1600) #define KEY_PROP_PITCH_HI_EX1 (KEY_ID_MIN + 1601) #define KEY_PROP_PITCH1_AXIS_SET_EX1 (KEY_ID_MIN + 1602) #define KEY_PROP_PITCH1_INCREASE_EX1 (KEY_ID_MIN + 1603) #define KEY_PROP_PITCH1_INCREASE_SMALL_EX1 (KEY_ID_MIN + 1604) #define KEY_PROP_PITCH1_DECREASE_EX1 (KEY_ID_MIN + 1605) #define KEY_PROP_PITCH1_DECREASE_SMALL_EX1 (KEY_ID_MIN + 1606) #define KEY_PROP_PITCH1_LO_EX1 (KEY_ID_MIN + 1607) #define KEY_PROP_PITCH1_HI_EX1 (KEY_ID_MIN + 1608) #define KEY_PROP_PITCH2_AXIS_SET_EX1 (KEY_ID_MIN + 1609) #define KEY_PROP_PITCH2_INCREASE_EX1 (KEY_ID_MIN + 1610) #define KEY_PROP_PITCH2_INCREASE_SMALL_EX1 (KEY_ID_MIN + 1611) #define KEY_PROP_PITCH2_DECREASE_EX1 (KEY_ID_MIN + 1612) #define KEY_PROP_PITCH2_DECREASE_SMALL_EX1 (KEY_ID_MIN + 1613) #define KEY_PROP_PITCH2_LO_EX1 (KEY_ID_MIN + 1614) #define KEY_PROP_PITCH2_HI_EX1 (KEY_ID_MIN + 1615) #define KEY_PROP_PITCH3_AXIS_SET_EX1 (KEY_ID_MIN + 1616) #define KEY_PROP_PITCH3_INCREASE_EX1 (KEY_ID_MIN + 1617) #define KEY_PROP_PITCH3_INCREASE_SMALL_EX1 (KEY_ID_MIN + 1618) #define KEY_PROP_PITCH3_DECREASE_EX1 (KEY_ID_MIN + 1619) #define KEY_PROP_PITCH3_DECREASE_SMALL_EX1 (KEY_ID_MIN + 1620) #define KEY_PROP_PITCH3_LO_EX1 (KEY_ID_MIN + 1621) #define KEY_PROP_PITCH3_HI_EX1 (KEY_ID_MIN + 1622) #define KEY_PROP_PITCH4_AXIS_SET_EX1 (KEY_ID_MIN + 1623) #define KEY_PROP_PITCH4_INCREASE_EX1 (KEY_ID_MIN + 1624) #define KEY_PROP_PITCH4_INCREASE_SMALL_EX1 (KEY_ID_MIN + 1625) #define KEY_PROP_PITCH4_DECREASE_EX1 (KEY_ID_MIN + 1626) #define KEY_PROP_PITCH4_DECREASE_SMALL_EX1 (KEY_ID_MIN + 1627) #define KEY_PROP_PITCH4_LO_EX1 (KEY_ID_MIN + 1628) #define KEY_PROP_PITCH4_HI_EX1 (KEY_ID_MIN + 1629) The comment from Asobo (from the link above) on these is: Quote These are used for planes with reverse throttle controls. The version of the KEY_EVENT you use depends on the type of aircraft. This is a to-document feature (and the KEY_EVENTs themselves were not exposed in the SDK), we apologize for the lack of clarity. John
jaxx Posted March 17, 2021 Report Posted March 17, 2021 I adapted my solution a bit to also get the reverser working with the Honeycomb Bravo reverser levers. I map the full axis to only the positive range (0-16383): function throttle_1(offset, value) -- 67103: Throttle1 Axis Set Ex1 ipc.control(67103, math.floor((16383 - value) / 2)) end function throttle_2(offset, value) -- 67110: Throttle2 Axis Set Ex1 ipc.control(67110, math.floor((16383 - value) / 2)) end And then set the reverser levers press and release to set and release the reverse throttle: [Buttons.CRJ] 0=W66C2>16300 PB,10,C67110,-16384 -{THROTTLE2_AXIS_SET_EX1}- 1=W66C2>16300 UB,10,C67110,0 -{THROTTLE2_AXIS_SET_EX1}- 2=W66C0>16300 PB,9,C67103,-16384 -{THROTTLE1_AXIS_SET_EX1}- 3=W66C0>16300 UB,9,C67103,0 -{THROTTLE1_AXIS_SET_EX1}- Works more reliably for me than using throttle decrease for the reversers. The "W66C0>16300" is just there to prevent any reverser action when the throttle is not near the idle position. You have to enable "Reverser Axis" in the CRJ cockpit options for this and calibrate the "rev max" to when you have pulled the reversers switches. 1
chrisal Posted March 17, 2021 Author Report Posted March 17, 2021 Hi Well I don't really understand what we're doing here but I've copied this throttle lua route exactly and the throttles are now moving - but in reverse. Any advice? Chris
jaxx Posted March 17, 2021 Report Posted March 17, 2021 19 minutes ago, chrisal said: Hi Well I don't really understand what we're doing here but I've copied this throttle lua route exactly and the throttles are now moving - but in reverse. Any advice? Chris My solution is under the assumption that you have to reverse the axes (like, the value reported from the axes in the forward position is negative and at idle is positive, but the sim expects it the other way round). Maybe with your hardware this is already working correctly, then you can simply use the control directly from the "Axes Assignment" without the need with the offset->lua workaround: Or alternatively don't reverse in the lua scripts, change(-1) - value -> value in the first lua or(16383 - value) -> (value + 16384) in the lua example with reversers. Also don't forget to calibrate the axes inside the aircraft on the pads options page and make sure you don't have the axes assigned in the MSFS settings.
chrisal Posted March 17, 2021 Author Report Posted March 17, 2021 That worked. Thanks. I just changed the lua "value" setting as suggested. FYI it is the Saitek quadrant I'm using. Cheers Chris
jaxx Posted March 17, 2021 Report Posted March 17, 2021 Great to hear. In that case, if you don't want any special handling like I did in my second example for the reverse thrust, you can just do what I showed in the picture of my last post. Use "Send to FS as normal Axes" to "Throttle1 Axis Set Ex1"/"Throttle2 Axis Set Ex1". The result sent to the simulator will be exactly the same. When you don't manipulate the value in the LUA script, doing axes->offset->lua->"Throttle1 Axis Set Ex1" is the same as just axes->"Throttle1 Axis Set Ex1", but the latter has much less overhead.
chrisal Posted March 17, 2021 Author Report Posted March 17, 2021 And that's what I've just done! Except I've mapped both(all) throttles to the one lever for now. i.e. Throttle Axis Set Ex1 Thanks again for your expertise. Chris
airway38 Posted March 26, 2021 Report Posted March 26, 2021 @jaxx, bit of a weird one for you. I've used your script as above, and recognized perfectly, but only when I go into the Joystick Calibration screen of FSUIPC. Otherwise, it's not getting recognized. Any idea as to why this could be? James
jaxx Posted March 27, 2021 Report Posted March 27, 2021 @airway38 It shouldn't go into the joystick calibration screen, as this will not use the EX1 axes. You could add the offsets you have mapped to the axes to the Offset logging and monitor in the console if they change according to your axes.
airway38 Posted March 28, 2021 Report Posted March 28, 2021 6 hours ago, jaxx said: @airway38 It shouldn't go into the joystick calibration screen, as this will not use the EX1 axes. You could add the offsets you have mapped to the axes to the Offset logging and monitor in the console if they change according to your axes. Thats what I thought. I had clicked on the calibration accidently, and that's when the logging started. Otherwise, it's not being logged/registered.
Freccia Posted May 25, 2021 Report Posted May 25, 2021 Hi @jaxx, I followed your advice and the throttle now works great. Thank you! I ask you (perhaps) the impossible: the throttle of my hotas has two detents (climb and flex), is it possible with FSUIPC to make the two positions coincide with those of the CRJ? Another thing, for the reverse I use a button with these settings: button pressed reverse max (FSUIPC throttle decr) button released the throttle returns to idle position (FSUIPC throttle cut). Do you think these settings are correct?
Larryadd Posted June 1, 2021 Report Posted June 1, 2021 Hi, Thank you for this great tutorial, works perfectly. Does someone managed to map the "shut off" to "Idle" and vice versa on a button ? maybe a macro pulling the red lever and pushing the throttle from shut off position to Idle position ? With the Bravo throttle quadrant, it could be great to have this feature on buttons 25 and 26. Thanks again.
John Dowson Posted July 19, 2021 Report Posted July 19, 2021 On 6/2/2021 at 12:04 AM, Larryadd said: Does someone managed to map the "shut off" to "Idle" and vice versa on a button ? maybe a macro pulling the red lever and pushing the throttle from shut off position to Idle position ? This is a bit old now (sorry!), but did you mange to do this? You can use the Mixture Lean control (or Mixturen Lean for the engine specific versions) for cut-off, and Mixture Rich (or Mixturen Rich) for idle.
Groschenbuegel Posted November 16, 2021 Report Posted November 16, 2021 Hello, just found this posting, desperately looking for a way to get my Honeycomb throttles to work with the CRJ. THROTTLEn_AXIS_SET_EX1 works, but I need the lua script to reverse them. This is my first experience with lua! So I added the LuaFiles text to my FSUIPC7.ini. Then made a textfile with the above code renamed it CRJ.LUA and placed it in the FSUIPC7 folder. This is my FSUIPC7.ini (the changed parts): Quote [Axes.CRJ] RangeRepeatRate=10 0=AY,256,F,66382,0,0,0 -{ TO SIM: AXIS_SPOILER_SET }- 1=AZ,1510,F,66534,0,0,0 -{ TO SIM: AXIS_FLAPS_SET }- 2=AR,1,F,x020066C0,0,0,0 -{ FSUIPC: offset word set, offset 66C0 }- 3=AV,1,F,x020066C2,0,0,0 -{ FSUIPC: offset byte set, offset 66C2 }- 4=BX,256,F,65763,0,0,0 -{ TO SIM: AXIS_AILERONS_SET }- 5=BY,256,F,65762,0,0,0 -{ TO SIM: AXIS_ELEVATOR_SET }- 6=CX,256,F,66387,0,0,0 -{ TO SIM: AXIS_LEFT_BRAKE_SET }- 7=CY,256,F,66388,0,0,0 -{ TO SIM: AXIS_RIGHT_BRAKE_SET }- 8=CZ,256,F,65764,0,0,0 -{ TO SIM: AXIS_RUDDER_SET }- [LuaFiles] LuaPath=lua 1=CRJ [Profile.CRJ] 1=CRJ [Auto.CRJ] 1=Lua CRJ [Axes.CRJ] RangeRepeatRate=10 0=BR,32,F,x020066C0,0,0,0 -{ FSUIPC: offset word set, offset 66C0 }- 1=BV,32,F,x020066C2,0,0,0 -{ FSUIPC: offset word set, offset 66C2 }- And here my CRJ.lua: Quote -- init throttle at idle on startup ipc.writeSW(0x66C0, 16383) ipc.writeSW(0x66C2, 16383) function throttle_1(offset, value) -- 67103: Throttle1 Axis Set Ex1 ipc.control(67103, (-1) - value) end function throttle_2(offset, value) -- 67110: Throttle2 Axis Set Ex1 ipc.control(67110, (-1) - value) end event.offset(0x66C0, "SW", "throttle_1") event.offset(0x66C2, "SW", "throttle_2") Unfortunately, the throttles don't move at all now and they are not recognised in the calibration panel either. Is the place where I placed the lua script (FSUIPC7 folder)correct ? Or what kind of fault did I make ? THANKS for your help !!
John Dowson Posted November 16, 2021 Report Posted November 16, 2021 4 minutes ago, Groschenbuegel said: just found this posting, desperately looking for a way to get my Honeycomb throttles to work with the CRJ. THROTTLEn_AXIS_SET_EX1 works, but I need the lua script to reverse them. Try first without using the luas. Just assign your throttle to the FS controls Throttle1 Axis Set Ex1 and Throttle2 Axis Set Ex1, and try reversing the axes by manually editing your ini and adding ,*-1 to the axes assignment lines - see the section Additional parameters to scale input axis values on the Advanced User guide (P39). 9 minutes ago, Groschenbuegel said: Unfortunately, the throttles don't move at all now and they are not recognised in the calibration panel either. The Ex1 axes controls cannot be calibrated using FSUIPC's calibration facilities. You need to use the axis input values scaling for these axes. Try that first before using the luas. Any issues, let me know. But if you do decide to use the luas instead, make sure that the lua is being started, usually you want to do this via your [Auto] or profile [Auto.xxx] ini file sections. If it still doesn't work, try activating debug logging for luas to see what is happening in the script (you can post your log file here if you want me to take a look). John
Groschenbuegel Posted November 16, 2021 Report Posted November 16, 2021 Hi John, it worked ! 👍 here's my Axes configuration now: Quote [Axes.CRJ] RangeRepeatRate=10 0=AY,256,F,66382,0,0,0 -{ TO SIM: AXIS_SPOILER_SET }- 1=AZ,1510,F,66534,0,0,0 -{ TO SIM: AXIS_FLAPS_SET }- 2=AR,1,F,67103,0,0,0,*-1 -{ TO SIM: THROTTLE1_AXIS_SET_EX1 }- 3=AV,1,F,67110,0,0,0,*-1 -{ TO SIM: THROTTLE2_AXIS_SET_EX1 }- 4=BX,256,F,65763,0,0,0 -{ TO SIM: AXIS_AILERONS_SET }- 5=BY,256,F,65762,0,0,0 -{ TO SIM: AXIS_ELEVATOR_SET }- 6=CX,256,F,66387,0,0,0 -{ TO SIM: AXIS_LEFT_BRAKE_SET }- 7=CY,256,F,66388,0,0,0 -{ TO SIM: AXIS_RIGHT_BRAKE_SET }- 8=CZ,256,F,65764,0,0,0 -{ TO SIM: AXIS_RUDDER_SET }- Quote The Ex1 axes controls cannot be calibrated using FSUIPC's calibration facilities. Oh sorry, that's a misunderstanding. with calibration panel I meant the CRJ Pad where you can calibrate the different states of the throttle (MAX,TOGA,CLIMB etc), not the FSUIPC calibration. Thank you very much for you superfast reply, you helped me a lot !! Nevertheless, I will have a look in the FSUIPC lua documentation to understand what and how it is used for. Greetings from Wuppertal, Germany Peter
John Dowson Posted November 16, 2021 Report Posted November 16, 2021 Hi Peter, 15 minutes ago, Groschenbuegel said: it worked ! 👍 Good! 16 minutes ago, Groschenbuegel said: Oh sorry, that's a misunderstanding. with calibration panel I meant the CRJ Pad where you can calibrate the different states of the throttle (MAX,TOGA,CLIMB etc), not the FSUIPC calibration. Ah, ok, understood. 16 minutes ago, Groschenbuegel said: Nevertheless, I will have a look in the FSUIPC lua documentation to understand what and how it is used for. Ok. Take a look at the examples provided - they should be in a zip file in your FSUIPC7 Documents folder. There are also several documents got using lua with FSUIPC7, but for general lua information you should consult google. Remember that a lua program needs to be started - if its event based, then you would usually start the lua from your [Auto] (or profile [Auto.xxx]) ini section. John
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