Jump to content
The simFlight Network Forums

Recommended Posts

Posted (edited)

I have been exploring the events with the DA62 aircraft. Several of the events are toggle type events (controls).

I was to understand that that toggle events have no parameters. However there are parameters displayed. One or two questions.

1. In the Event Log Entry - one of the kex values is the parameter. What is the other hex value?

2. If a toggle event has no parameter, do you know why one is shown in the entries?

3. If there are 2 indices in an event, is the param one of the indices and can Lua show both indices?

 Engine Master Left On 
   1862188 *** EVENT: Cntrl= 67063 (0x000105f7), Param= 0 (0x00000000) ENGINE_MASTER_1_TOGGLE
  1862204 *** EVENT: Cntrl= 67073 (0x00010601), Param= 9 (0x00000009) ELECTRICAL_BUS_TO_BUS_CONNECTION_TOGGLE
  1862204 *** EVENT: Cntrl= 67073 (0x00010601), Param= 5 (0x00000005) ELECTRICAL_BUS_TO_BUS_CONNECTION_TOGGLE
  1862204 *** EVENT: Cntrl= 67073 (0x00010601), Param= 7 (0x00000007) ELECTRICAL_BUS_TO_BUS_CONNECTION_TOGGLE
  1862204 *** EVENT: Cntrl= 66241 (0x000102c1), Param= 2 (0x00000002) TOGGLE_MASTER_BATTERY
  1862204 *** EVENT: Cntrl= 67073 (0x00010601), Param= 6 (0x00000006) ELECTRICAL_BUS_TO_BUS_CONNECTION_TOGGLE

ELECTRICAL_BUS_TO_BUS_CONNECTION_TOGGLE

[0]: Source bus index

[1]: bus index

Toggle bus connection state with a bus. Takes two indices, the initial bus and the second bus (see SimVars And Keys for more information). The bus index is the N index of the bus.N definition in both cases.
Edited by DaveSCUSA
Posted
15 hours ago, DaveSCUSA said:

I was to understand that that toggle events have no parameters.

Most toggle events don't take any parameters, but some do in MSFS.

15 hours ago, DaveSCUSA said:

1. In the Event Log Entry - one of the kex values is the parameter. What is the other hex value?

 

Two values are shown, the control/event number, and the parameter. Both numbers are shown as decinmal integers with the hex equivalent after this in brackets.

15 hours ago, DaveSCUSA said:

2. If a toggle event has no parameter, do you know why one is shown in the entries?

Sime toggle events do have parameters -this is obviously one that does.

15 hours ago, DaveSCUSA said:

3. If there are 2 indices in an event, is the param one of the indices and can Lua show both indices?

Only one parameter/indices is currently logged. There currently seems to be some confusion between the events that take multiple parameters and those that don't, and also a similar confusion between standard controls and *_Ex1 controls. This is rather technical, but multiple parameters for events are only seen when received as *_EX1 events. not as standard events. And many EX1 events don't take multiple parameters and are received as standard events, not EX1 events.
I will look into trying to log multiple parameters for events when such parameters are received. But note that it is only possible to send events with multiple parameters/indices by using calculator code.

Posted

In the next release, I  will update to log multiple parameters when available. I have tested this in the DA62 with the Left Engine Master On switch, and this is now what   is logged:

Quote

   301203 *** EVENT: Cntrl= 67063 (0x000105f7), Param= 0 (0x00000000) ENGINE_MASTER_1_TOGGLE
   301328 *** EVENT: Cntrl= 67073 (0x00010601), Param1= 9 (0x00000009), Param2= 1 (0x00000001) ELECTRICAL_BUS_TO_BUS_CONNECTION_TOGGLE
   301328 *** EVENT: Cntrl= 67073 (0x00010601), Param1= 5 (0x00000005), Param2= 2 (0x00000002) ELECTRICAL_BUS_TO_BUS_CONNECTION_TOGGLE
   301328 *** EVENT: Cntrl= 67073 (0x00010601), Param1= 7 (0x00000007), Param2= 5 (0x00000005) ELECTRICAL_BUS_TO_BUS_CONNECTION_TOGGLE
   301328 *** EVENT: Cntrl= 66241 (0x000102c1), Param= 2 (0x00000002) TOGGLE_MASTER_BATTERY
   301328 *** EVENT: Cntrl= 67073 (0x00010601), Param1= 6 (0x00000006), Param2= 13 (0x0000000d) ELECTRICAL_BUS_TO_BUS_CONNECTION_TOGGLE

Note that the easiest may to control this switch via assignments is to use the Input Event ENGINE_Master_1. Assignment to Input Events is a new feature and currently only available in the latest beta release, from this topic: 

I will update the beta available there in the next couple of days with a version that will include this additional parameter logging for events/controls that have more than one parameter. The official release date of this version (7.3.26) is still TBD.

John

Posted
1 hour ago, John Dowson said:

I will update the beta available there in the next couple of days with a version that will include this additional parameter logging for events/controls that have more than one parameter.

This feature has now been released in the latest beta, 7.3.26f.

John

Posted
5 hours ago, John Dowson said:

I will look into trying to log multiple parameters for events when such parameters are received. But note that it is only possible to send events with multiple parameters/indices by using calculator code.

Thank you again.

It is difficult using ipc.execCalcCode(“code”) when you don't know the indices used. I look forward to using the Beta version today. Is there a significance of the parameter in the event log with a toggle? apparently it shows correctly with the SET controls. The ELECTRICAL_BUS_TO_BUS_CONNECTION_TOGGLE seems to show multiple numbers in the param.

Posted
48 minutes ago, DaveSCUSA said:

Is there a significance of the parameter in the event log with a toggle?

Yes, there will be. For example, for the TOGGLE_MASTER_BATTERY event:

Quote
TOGGLE_MASTER_BATTERY

[0]: battery index

Toggle battery switch state. The battery index is the N index of the battery.N definition.

So the parameter is the index of the battery.

Posted

Thanks for your development and attention.

I tried FSUIPC7 "********* FSUIPC7, Version 7.3.26f (23rd November 2023) by John Dowson *********"

I had a slight problem as there were several unrecognized input events as if in a loop. I have attached the log. I also extracted the "InputEvent received but not known:" input events, sorted by name, marked the duplicates and resorted by FSUIPC7 time. They are listed in the file FSUIPC7.sorted.txt.

I'm not sure what to make of this? This the DA62 Improvement Mod.

Just got a message "too large". I'll have to cut them back.

The log ended at line # 47,930.

2FSUIPC7.log 2-FSUIPC7.sorted.txt

Posted (edited)

Please post any issues with the beta version in the announcement topic (as it says). Can you please repost your issue in that thread. 

I will look into this tomorrow  (and install the improvement mod to check here), but I will respond in the beta announcement topic.

John

P.S. No point extracting and/or sorting log entries. If a log file is too large to attach, zip/compress it. I always need the full log file.

Edited by John Dowson
PS added
Posted

The "InputEvent received but not known:" messages were logged as no input events were received. This was because they were being requested to early - I have corrected this in the next update which I will release shortly. in the beta announcement thread. Please update and try this when released.

And please remember to report any issues in the beta release thread, not here.

John

Posted

Thanks, will add any other comments to the "Beta" post.

Will starting FSUIPC7 or logging input events later in the start up (after Ready to Fly) make any difference for now?

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.