plane icon Welcome to Microsoft Flight Simulator’s SDK Q&A Platform!

You have questions regarding the SDK? DevMode Tools? SimConnect? You would like to submit an idea for future improvements, seek help or exchange knowledge? You’re in the right place.


Please take a moment to read the platform’s guidelines before you get started!


question

SimfestGary avatar image
SimfestGary asked Yoanito answered

SU11 : Simconnect Time Events Stop Working

Since SU11 Beta the Time Client Events don't seem to work when we transmit them from a managed C# Simconnect client.

Definition

   simconnect.MapClientEventToSimEvent(EVENTS.CLOCK_SECONDS_ZERO, "CLOCK_SECONDS_ZERO");
   simconnect.MapClientEventToSimEvent(EVENTS.ZULU_MINUTES_SET, "ZULU_MINUTES_SET");
   simconnect.MapClientEventToSimEvent(EVENTS.ZULU_HOURS_SET, "ZULU_HOURS_SET");
   simconnect.MapClientEventToSimEvent(EVENTS.ZULU_DAY_SET, "ZULU_DAY_SET");
   simconnect.MapClientEventToSimEvent(EVENTS.ZULU_YEAR_SET, "ZULU_YEAR_SET");

Transmit Methods

 simconnect.TransmitClientEvent(0, EVENTS.ZULU_YEAR_SET, (uint)timeModel.ZuluYear, NOTIFICATION_GROUPS.GROUP0, SIMCONNECT_EVENT_FLAG.DEFAULT);
simconnect.TransmitClientEvent(0, EVENTS.ZULU_DAY_SET, (uint)timeModel.ZuluDay, NOTIFICATION_GROUPS.GROUP0, SIMCONNECT_EVENT_FLAG.DEFAULT);
simconnect.TransmitClientEvent(0, EVENTS.ZULU_HOURS_SET, (uint)zuluHours, NOTIFICATION_GROUPS.GROUP0, SIMCONNECT_EVENT_FLAG.DEFAULT);
simconnect.TransmitClientEvent(0, EVENTS.ZULU_MINUTES_SET, (uint)timeModel.ZuluMinutes, NOTIFICATION_GROUPS.GROUP0, SIMCONNECT_EVENT_FLAG.DEFAULT);

I have run exactly the same codebase against SU10 and SU11. It works fine in SU10 (the time changes) and in SU11 nothing happens.

Cheers

Gary



simconnect
10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

1 Answer

·
Yoanito avatar image
Yoanito answered

Hello @SimfestGary
I've tried in SU10 and SU11 and everything is working well for me, here the code i've tried with :

SimConnect.MapClientEventToSimEvent(EVENTS.ZULU_MINUTE, "ZULU_MINUTES_SET");
SimConnect.AddClientEventToNotificationGroup(GROUP.GROUP0, EVENTS.ZULU_MINUTE, false);
SimConnect.TransmitClientEvent(0, EVENTS.ZULU_MINUTE, 0, GROUP.GROUP0, SIMCONNECT_EVENT_FLAG.DEFAULT);


Can you see any differences in your code and if yes, try to use mine ? If it's still not working can you send me your code (See 3: Provide Private Content).

Best Regards,
Yohan

10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 5 attachments (including images) can be used with a maximum of 19.1 MiB each and 23.8 MiB total.