Jump to content
The simFlight Network Forums

Button & Swtich Assignments issue


stiletto2
 Share

Recommended Posts

The Keyboard Controls in MSFS2020 that I can use to control the dual Avionics switches in the Cessna 172 are Avionics Master 1 Off, Avionics Master 2 Off, Avionics Master 1 On and Avionics Master 2 On.  (Note: The  Toggle Avionics Master keyboard control has no affect ont he Avionics Master 1 & 2 in the Cessna 172).   In the Button and Switch Assignments section of FSUIPC, the exensive "Control sent when button pressed" drop down list does not contain any controls that match the  four Avionics Master  controls I mentioned above.  Shouldn't they be in the list?

Rod

Link to comment
Share on other sites

Hi Rod,

the individual controls are no longer present in MSFS - well, in the SDK documentation. I'll activate them here locally to see if they work, and if so I'll report back and add them back in for the next release.

I've just taken a look at the C172 and it looks like the Toggle Avionics Master has no affect. However, the Avionics Master Set control works. You can use this with a parameter of 1 to turn both avionic systems on, and 0 to turn them off.

John

Link to comment
Share on other sites

It seems that the events MSFS uses to control the avionics individually have not been exposed through SimConnect. Activating them via the UI (or via an assignment in MSFS) shows no associated event/control. I can ask if its possible to add these to the SDK. For now, you would have to use the Avionics Master Set.

Link to comment
Share on other sites

1 minute ago, codatcri said:

It works if you have a switch but if you have a button, as I have, it don't.

When I release the button avionics go off.

Any Idea to manage this situation with Avionics Master Set and a button?

Don't send a control on the button release.

You can overload the button press to send both the Avionics set on and Avionics set off event/control when the button is pressed. You will need to manually edit the ini to achieve this. You then need to add an offset conditional check on  offset 0x2E80, so that only the 'off' control (with parameter 0) is sent when the avionics are on, and the 'on' control (with parameter 1) is sent when the avionics are off.  Offset conditions are explained in the Advanced user manual (for FSUIPC4/5/6).

Link to comment
Share on other sites

Thanks John.

I modified the ini file this way:

413=0x2E80=1 PF,24,C66701,0     -{AVIONICS_MASTER_SET}-
415=0x2E80=0 UF,24,C66701,1     -{AVIONICS_MASTER_SET}-

then i tried with

413=W0x2E80=1 PF,24,C66701,0     -{AVIONICS_MASTER_SET}-
415=W0x2E80=0 UF,24,C66701,1     -{AVIONICS_MASTER_SET}-

but it doesn't work.

Waht am i doing wrong?

 

 

Link to comment
Share on other sites

Maybe this will help. A few points -
- 0x2E80 is 4 bytes = 32 bit = Double Word. Therefore the Offset designator should be a "D"
- According to the docs the "0x" for the offset isn't shown in the examples.
- Your second entry, 415, is on the release "U", therefore when you press the button it will turn off, if on. Once you will release the button it will turn on again.
Avionics already on - Press = 413 turn off, 415 is skipped , Release = 413 is skipped, 415 turn on
Avionics already off - Press = 413 is skipped, 415 is skipped , Release = 413 is skipped, 415 turn on

This may do it for you -
413=D2E80=1 PF,24,C66701,0     -{AVIONICS_MASTER_SET}-
415=D2E80=0 PF,24,C66701,1     -{AVIONICS_MASTER_SET}-

Avionics already on - Press = 413 turn off, 415 is skipped, Release = nothing
Avionics already off - Press = 413 is skipped, 415 turn on, Release = nothing

Roman

  • Like 1
Link to comment
Share on other sites

3 hours ago, spokes2112 said:

This may do it for you -
413=D2E80=1 PF,24,C66701,0     -{AVIONICS_MASTER_SET}-
415=D2E80=0 PF,24,C66701,1     -{AVIONICS_MASTER_SET}-

Yes, thanks spokes2112.

Seeing as it is only a 0 or a 1 anyway, a "B" or "W" prefix would also work. So really the only thing wrong with codatcrl's solution:

10 hours ago, codatcri said:

413=W0x2E80=1 PF,24,C66701,0     -{AVIONICS_MASTER_SET}-
415=W0x2E80=0 UF,24,C66701,1     -{AVIONICS_MASTER_SET}-

is his format with "0x" before the offset value -- a habit from C++ programming, perhaps?

Pete

 

Link to comment
Share on other sites

I tried

419=D2E80=1 PF,24,C66701,0     -{AVIONICS_MASTER_SET}-
420=D2E80=0 PF,24,C66701,1     -{AVIONICS_MASTER_SET}-

OR

419=B2E80=1 PF,24,C66701,0     -{AVIONICS_MASTER_SET}-
420=B2E80=0 PF,24,C66701,1     -{AVIONICS_MASTER_SET}-

OR

419=W2E80=1 PF,24,C66701,0     -{AVIONICS_MASTER_SET}-
420=W2E80=0 PF,24,C66701,1     -{AVIONICS_MASTER_SET}-

but no effect. it does only what is indicated in the button &switcha sssinment window.

See also the log...

immagine.png.99c62ff2fa9b4a1d6f195aa9b22cbe9b.pngimmagine.png.6fab01bec930d3c7ccbf68fcb0dec9e5.png

Link to comment
Share on other sites

It looks exactly like the edit you've made to your FSUIPC7.INI is not in the FSUIPC7.INI file you are actually using. If there were really two assignments to the same button then you couldn't edit it in the options, and there would be a banner at the top telling you to edit the INI.

The log confirms this with the entry without the condition. So please check the FSUIPC7 folder and see that you have one file called FSUIPC7.INI and that is the one you are editing.

Pete

 

 

Link to comment
Share on other sites

No I'm sure to have only one .ini.

I restarted from scratch ( that is : FS OFF, fsuipc with no assinment for the button)

- I added this to lines to the .ini

419=D2E80=1 PF,24,C66701,0     -{AVIONICS_MASTER_SET}-
420=D2E80=0 PF,24,C66701,1     -{AVIONICS_MASTER_SET}-

- saved and closed fsuipc

- restarted everything

- cheched in the buttons & switch assignment window: the controls appears not selectable

immagine.png.4ae0ab9e0d102fee5965e5c1fc6cd685.png

- also the log file now confims the condition

immagine.png.991613a60f2ff24d8f238804eca4fcb1.png

Probably had to restart FSUIPC for the modifications to take effect.

In any case it WORKS!!!

Thanks a lot, Pete & Roman... very kind as usual! I learned somethig new.

Link to comment
Share on other sites

22 minutes ago, codatcri said:

Probably had to restart FSUIPC for the modifications to take effect.

You can edit assignments in the INI whilst FSUIPC is running, but to invoke the changes you then need to use the "reload" button on the appropriate assignments tab, so that it reads them.

Pete

 

Link to comment
Share on other sites

  • 1 month later...

I have added two new (undocumented) controls for the master avionics:
     Avionics Master 1 Set
     Avionics Master 2 Set

Tested these in the C172 and they seem to operate in the reverse manner than usual, with a parameter of 1 turning the avionics off, and a parameter of 0 turning them on. These new controls are available in the attached version:     

FSUIPC7.exe

Link to comment
Share on other sites

  • 2 weeks later...

I'm so pleased I happened upon this thread. I've been driven mad by Avionics Master Set and every vaiation of it. I very nearly resorted to letting MSFS do the job but that would be giving in eh? Due to your input here I now have the avionics switch working, albeit upside down. On is off and vice versa. but I can live with that.

Are there any other commands like that? Is Asobo taking notice of you?

Anyway, thanks.

EDIT: I assume those controls are in the paid for version already?

Link to comment
Share on other sites

10 hours ago, Ron Attwood said:

EDIT: I assume those controls are in the paid for version already?

Yes.

10 hours ago, Ron Attwood said:

Are there any other commands like that?

A few. These ae the current 'undocumented' controls that have been added:
   AILERON_TRIM_SET
   RUDDER_TRIM_SET
   TOGGLE_AIRCRAFT_EXIT_FAST
   HEADING_SLOT_INDEX_SET
   SPEED_SLOT_INDEX_SET
   ALTITUDE_SLOT_INDEX_SET
   VS_SLOT_INDEX_SET
   THROTTLE_REVERSE_THRUST_TOGGLE
   AVIONICS_MASTER_1_SET
   AVIONICS_MASTER_2_SET

It has also been noted that the TOGGLE_MASTER_BATTERY control accepts a parameter to toggle individual batteries - see 

John

 

Link to comment
Share on other sites

On 11/10/2020 at 3:25 AM, John Dowson said:

Yes.

A few. These ae the current 'undocumented' controls that have been added:
   AILERON_TRIM_SET
   RUDDER_TRIM_SET
   TOGGLE_AIRCRAFT_EXIT_FAST
   HEADING_SLOT_INDEX_SET
   SPEED_SLOT_INDEX_SET
   ALTITUDE_SLOT_INDEX_SET
   VS_SLOT_INDEX_SET
   THROTTLE_REVERSE_THRUST_TOGGLE
   AVIONICS_MASTER_1_SET
   AVIONICS_MASTER_2_SET

It has also been noted that the TOGGLE_MASTER_BATTERY control accepts a parameter to toggle individual batteries - see 

John

 

Hi John,

I have not been able to get AILERON TRIM LEFT and AILERON TRIM RIGHT (controls 66276 and 66277) working, but after seeing  AILERON_TRIM_SET in the above list I'm wondering if that suggests I should also be able to get AILERON TRIM LEFT and AILERON TRIM RIGHT to work?

Thanks,

Al

Link to comment
Share on other sites

Hi,

AILERON TRIM LEFT/RIGHT don't work in SimConnect yet, Asobo will have to fix those like many others.

But AILERON TRIM SET works and so does RUDDER TRIM SET. Both can be assigned as an controller axis in Axis Assignment tab and calibrated in Joystick Calibration tab (P7). You can as well write to the control 66731 (AIL TRIM) or 66732 (RUD TRIM). When writing to the Controls a value please note that the value has to be within the trimmable aircraft range, most likely -10.0 to +10.0 degree. The value you write has to be the multiple of 10, -10.0 = -100 and +10.0 = 100.

Thomas

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.