Add Pause/Resume simulator EVENT in event_subscribe

Let Sim Innovations know about your Air Manager experience and let us know about your dream feature addition

Moderators: russ, Ralph

Post Reply
Message
Author
User avatar
nnyerges
Posts: 151
Joined: Sat Jun 18, 2022 6:28 pm

Add Pause/Resume simulator EVENT in event_subscribe

#1 Post by nnyerges »

Hi, i know you guys are bussy right now in Germany.

It will a nice help for those that use the Air Manager/Players in professional mode, to add a PAUSE/RESUME simulator event in the event_subscribe(callback) . Why? ..in a FSTD session, the instructor several times pause the simulation to give some instructions to the pilot/copilot. In the mean time, someone of them (pilot/copilot), can change a switch or a control during the pause event, but if you resume the simulator, WE programmer's dont have any signal to trigger back all inputs states of all controls and switchs possitions before continue and everything its mixtup. Actually you have to manually move all controls or switchs after resume.

EDITED:
When sim its paused or freeze, hardware IO's scripts keeps running and any physical changes that pilot/copilot do its reflected inmediatly in to the sim, so the above description doenst make any sence. My mistake.
Last edited by nnyerges on Sat Jun 15, 2024 12:59 pm, edited 1 time in total.
Chief Technology Officer (CTO) at 360ATC Aviation Training Center & Aviation One Academy
Electronic Engineer. Control & Software Specialist

User avatar
Keith Baxter
Posts: 4830
Joined: Wed Dec 20, 2017 11:00 am
Location: Gauteng

Re: Add Pause/Resume simulator EVENT in event_subscribe

#2 Post by Keith Baxter »

Hi,

Would persist not work.
You could save the events to persist then recall on resume.

https://siminnovations.com/wiki/index.php/Persist_add


Keiyh
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board,  32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card 

User avatar
nnyerges
Posts: 151
Joined: Sat Jun 18, 2022 6:28 pm

Re: Add Pause/Resume simulator EVENT in event_subscribe

#3 Post by nnyerges »

You're right, Keith, and also an initial read of the hardware and a callback request does the job. I just realized that this topic subject: "Add pause/resume simulator EVENT in event_subscribe", it's ok but it's not really what I want to achieve and I'll will post a new topic like: "Add START SIMULATION to the event_subscribe" will be more accurate for my subject :lol: .

In the meantime and to take advantage of this topic, it's not a bad idea to add PAUSE/RESUME/FREEZE events inside event_subscribe in the API. Just use
sim/time/paused
or
sim/operation/freeze_toggle
Have a good weekend and Father's Day for those who celebrate it!
Chief Technology Officer (CTO) at 360ATC Aviation Training Center & Aviation One Academy
Electronic Engineer. Control & Software Specialist

Post Reply