From 9c90c4e4d2d1a221cbea09b4b01ac2e51c4e2403 Mon Sep 17 00:00:00 2001 From: Michael Thompson Date: Thu, 6 Jul 2017 13:29:42 -0700 Subject: [PATCH] Updated flags to allow for individual pause commands --- Python/src/xpc.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Python/src/xpc.py b/Python/src/xpc.py index a543c7b..71b7eb2 100644 --- a/Python/src/xpc.py +++ b/Python/src/xpc.py @@ -98,10 +98,12 @@ class XPlaneConnect(object): '''Pauses or un-pauses the physics simulation engine in X-Plane. Args: - pause: True to pause the simulation; False to resume. + pause: True to pause the simulation for all a/c; False to resume for all a/c. + 2 to switch the status for all a/c. 100:119 to pause a/c 0:19. 200:219 to + resume a/c 0:19 ''' pause = int(pause) - if pause < 0 or pause > 2: + if pause < 0 or (pause > 2 and pause < 100) or (pause > 119 and pause < 200) or pause > 219 : raise ValueError("Invalid argument for pause command.") buffer = struct.pack("<4sxB", "SIMU", pause)