Changeset 133:dcbe33497899 for src/mlx/fsuipc.py
- Timestamp:
- 04/30/12 13:15:14 (12 years ago)
- Branch:
- default
- hg-Phase:
- (<MercurialRepository 1 'hg:/home/ivaradi/mlx/hg' '/'>, 'public')
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/fsuipc.py
r117 r133 436 436 normalData = timeData + \ 437 437 [ (0x3d00, -256), # The name of the current aircraft 438 (0x3c00, -256) ] # The path of the current AIR file 438 (0x3c00, -256), # The path of the current AIR file 439 (0x1274, "h") ] # Text display mode 439 440 440 441 flareData1 = [ (0x023a, "b"), # Seconds of time … … 496 497 self._handler.start() 497 498 499 self._scroll = False 500 498 501 self._normalRequestID = None 499 502 … … 576 579 self._flareRequestID = None 577 580 581 def sendMessage(self, message, duration = 3): 582 """Send a message to the pilot via the simulator. 583 584 duration is the number of seconds to keep the message displayed.""" 585 586 if self._scroll: 587 if duration==0: duration = -1 588 elif duration == 1: duration = -2 589 else: duration = -duration 590 591 data = [(0x3380, -1 - len(message), message), 592 (0x32fa, 'h', duration)] 593 594 self._handler.requestWrite(data, self._handleMessageSent) 595 578 596 def disconnect(self): 579 597 """Disconnect from the simulator.""" … … 613 631 614 632 createdNewModel = self._setAircraftName(timestamp, data[5], data[6]) 633 634 self._scroll = data[7]!=0 615 635 616 636 if self._monitoringRequested and not self._monitoring: … … 763 783 dow = zfw - payload 764 784 callback(dow, payload, zfw, grossWeight) 785 786 def _handleMessageSent(self, success, extra): 787 """Callback for a message sending request.""" 788 pass 765 789 766 790 #------------------------------------------------------------------------------
Note:
See TracChangeset
for help on using the changeset viewer.