Pymaxflight
pyMaxFlight Index /
src
/
Pymaxflight
Auto-generated documentation for src.pyMaxFlight module.
Attributes
-
HWND
- Typedef:int
- MotionClient
- MotionClient().counterweightBwd
- MotionClient().counterweightFwd
- MotionClient().forceRaised
- MotionClient().freeze
- MotionClient().getCanopyOpen
- MotionClient().getEmergencyStop
- MotionClient().getLeftRaised
- MotionClient().getLiftReal
- MotionClient().getLogRange
- MotionClient().getLowered
- MotionClient().getPitchMax
- MotionClient().getPitchMin
- MotionClient().getPitchReal
- MotionClient().getPitchTarget
- MotionClient().getReady
- MotionClient().getRightRaised
- MotionClient().getRollMax
- MotionClient().getRollMin
- MotionClient().getRollReal
- MotionClient().getRollTarget
- MotionClient().home
- MotionClient().isMainWindowOpen
- MotionClient().isProcessOpen
- MotionClient().liftLower
- MotionClient().liftRaise
- MotionClient().liftStop
- MotionClient().run
- MotionClient().setPitchTarget
- MotionClient().setRollTarget
- MotionClient().start
- MotionClient().status
- MotionClient().stop
MotionClient
Provides an interface to the MaxFlight Motion Client.
Calling commands without the client open will result in an exception. NEVER use the Motion Client fully unattended.
Signature
class MotionClient:
...
MotionClient().counterweightBwd
Manually moves the counterweight backwards (towards the tail).
This is for troubleshooting and is not necessary to activate under normal circumstances.
Signature
@_ifHandleValid
def counterweightBwd(self):
...
MotionClient().counterweightFwd
Manually moves the counterweight forwards (towards the cabin).
This is for troubleshooting and is not necessary to activate under normal circumstances.
Signature
@_ifHandleValid
def counterweightFwd(self):
...
MotionClient().forceRaised
Forces simulator into raised state. (?)
This is for troubleshooting and is not necessary to activate under normal circumstances.
Signature
@_ifHandleValid
def forceRaised(self):
...
MotionClient().freeze
Locks current target rotation.
Signature
@_ifHandleValid
def freeze(self):
...
MotionClient().getCanopyOpen
Gets whether the canopy is open.
Note that this does not indicate whether the canopy is locked. There is currently no way to detect this.
Signature
@_ifHandleValid
def getCanopyOpen(self) -> bool:
...
MotionClient().getEmergencyStop
Gets whether the emergency stop button is pressed inwards.
Signature
@_ifHandleValid
def getEmergencyStop(self) -> bool:
...
MotionClient().getLeftRaised
Gets whether the left hydraulic lift has reached the highest position.
Signature
@_ifHandleValid
def getLeftRaised(self):
...
MotionClient().getLiftReal
Get real lift measurement. (?)
Signature
@_ifHandleValid
def getLiftReal(self) -> float:
...
MotionClient().getLogRange
Gets range of log messages.
If low is undefined, it will be set to 0. If high is undefined, it will be set to the last element of the list. Both indices are inclusive.
Signature
@_ifHandleValid
def getLogRange(self, low: int = 0, high: int = None) -> list[str]:
...
MotionClient().getLowered
Gets whether the both hydraulic lifts are at the lowest position.
Signature
@_ifHandleValid
def getLowered(self) -> bool:
...
MotionClient().getPitchMax
Gets maximum pitch position in degrees.
Signature
@_ifHandleValid
def getPitchMax(self) -> int:
...
MotionClient().getPitchMin
Gets minimum pitch position in degrees.
Signature
@_ifHandleValid
def getPitchMin(self) -> int:
...
MotionClient().getPitchReal
Get real pitch measurement.
Signature
@_ifHandleValid
def getPitchReal(self) -> float:
...
MotionClient().getPitchTarget
Gets target pitch position in degrees.
Signature
@_ifHandleValid
def getPitchTarget(self) -> int:
...
MotionClient().getReady
Returns whether simulator is ready to accept movement commands.
Signature
@_ifHandleValid
def getReady(self) -> bool:
...
MotionClient().getRightRaised
Gets whether the right hydraulic lift has reached the highest position.
Signature
@_ifHandleValid
def getRightRaised(self) -> bool:
...
MotionClient().getRollMax
Gets maximum roll position in degrees.
Signature
@_ifHandleValid
def getRollMax(self) -> int:
...
MotionClient().getRollMin
Gets minimum roll position in degrees.
Signature
@_ifHandleValid
def getRollMin(self) -> int:
...
MotionClient().getRollReal
Get real roll measurement.
Signature
@_ifHandleValid
def getRollReal(self) -> float:
...
MotionClient().getRollTarget
Gets target roll position in degrees.
Signature
@_ifHandleValid
def getRollTarget(self) -> int:
...
MotionClient().home
Sets target roll and pitch to 0.
Signature
@_ifHandleValid
def home(self):
...
MotionClient().isMainWindowOpen
True if Motion Client is open, otherwise False.
Signature
@property
def isMainWindowOpen(self) -> bool:
...
MotionClient().isProcessOpen
True if Motion Client process is open, otherwise False.
Signature
@property
def isProcessOpen(self) -> bool:
...
MotionClient().liftLower
Initiates the lowering process.
Signature
@_ifHandleValid
def liftLower(self):
...
MotionClient().liftRaise
Initiates the lifting process.
Signature
@_ifHandleValid
def liftRaise(self):
...
MotionClient().liftStop
Interrupts the lifting process.
Signature
@_ifHandleValid
def liftStop(self):
...
MotionClient().run
Activate roll and pitch rotation. Requires start to have been executed.
Signature
@_ifHandleValid
def run(self):
...
MotionClient().setPitchTarget
Sets target pitch position in degrees.
See getPitchMax and getPitchMin for input range.
Signature
@_ifHandleValid
def setPitchTarget(self, val: int):
...
MotionClient().setRollTarget
Sets target roll position in degrees.
See getRollMax and getRollMin for input range.
Signature
@_ifHandleValid
def setRollTarget(self, val: int):
...
MotionClient().start
Prepares roll and pitch rotation. Requires the lifting process be complete.
Despite the name of this function (which matches the button), run must still be triggered to begin moving.
Signature
@_ifHandleValid
def start(self):
...
MotionClient().status
Compiles many of the status getters above into a serializable object.
This excludes any log output and min/max values as they would be redundant to save.
Signature
@_ifHandleValid
def status(self) -> dict:
...
MotionClient().stop
Returns simulator to neutral rotation and halts further movement.
Signature
@_ifHandleValid
def stop(self):
...