Jump to content
The simFlight Network Forums

CRJ and FSUIPC


chrisal
 Share

Recommended Posts

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

Link to comment
Share on other sites

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 }-

offset.PNG.c864dbcb939df59d5fdae119b92b26df.PNG

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")

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.throttleCalibration.PNG.b44656e7ce93ac22e74d6e1ac415e45d.PNG

  • Like 1
Link to comment
Share on other sites

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:
axes_assigment.PNG.0d6dddc43c9723e5af60b345665c7eaf.PNG

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 2 weeks later...

@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

Link to comment
Share on other sites

@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.

Link to comment
Share on other sites

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. 

Link to comment
Share on other sites

  • 1 month later...

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 1 month later...
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.
 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.