Skip to content

Commit

Permalink
MSFS | try to work around some of 2024 pausing issues
Browse files Browse the repository at this point in the history
  • Loading branch information
mjfrisby committed Dec 10, 2024
1 parent 3b148a6 commit b5ec4ab
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion telemffb/telem/SimConnectManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,9 @@ class SimConnectManager(threading.Thread):
SimVarArray("HydResPct", "HYDRAULIC RESERVOIR PERCENT", "Percent Over 100", min=1, max=2),
SimVar("HydSwitch", "HYDRAULIC SWITCH", "bool"),
SimVar("HydSys", "HYDRAULIC SYSTEM INTEGRITY", "Percent Over 100"),
SimVar("_IS IN RTC", "IS IN RTC", "bool"),
SimVar("_IS AVATAR", "IS AVATAR", "bool"),
SimVar("_IS AIRCRAFT", "IS AIRCRAFT", "bool"),

]

Expand Down Expand Up @@ -478,7 +481,10 @@ def _read_telem(self) -> bool:
# if not self._sim_paused and not data["Parked"] and not data["Slew"]: # fixme: figure out why simstart/stop and sim events dont work right
# self.emit_packet(data)
# self._final_frame_sent = 0
if self._sim_paused or data.get("Parked", 0) or data.get("Slew", 0): # fixme: figure out why simstart/stop and sim events dont work right
avatar = data.get("_IN AVATAR", False) # in 2024, see if user is controlling avatar
rtc = data.get("_IS IN RTC", False) # check if 2024 sim is running realtime cinematic (cut scene)

if self._sim_paused or data.get("Parked", 0) or data.get("Slew", 0) or avatar or rtc: # fixme: figure out why simstart/stop and sim events dont work right
data["STOP"] = 1
data['_num_simvars'] = len(data)

Expand Down

0 comments on commit b5ec4ab

Please sign in to comment.