Changeset 315:baa139ef7784 for src/mlx
- Timestamp:
- 09/30/12 07:16:34 (12 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- src/mlx
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/const.py
r308 r315 276 276 MESSAGETYPE_INFORMATION = 2 277 277 278 ## Message type: in-flight information 279 MESSAGETYPE_INFLIGHT = 3 280 278 281 ## Message type: fault messages 279 MESSAGETYPE_FAULT = 3282 MESSAGETYPE_FAULT = 4 280 283 281 284 ## Message type: NO-GO fault messages 282 MESSAGETYPE_NOGO = 4285 MESSAGETYPE_NOGO = 5 283 286 284 287 ## Message type: gate system messages 285 MESSAGETYPE_GATE_SYSTEM = 5288 MESSAGETYPE_GATE_SYSTEM = 6 286 289 287 290 ## Message type: environment messages 288 291 # FIXME: flight plan closed (5 sec) 289 MESSAGETYPE_ENVIRONMENT = 6292 MESSAGETYPE_ENVIRONMENT = 7 290 293 291 294 ## Message type: help messages 292 MESSAGETYPE_HELP = 7295 MESSAGETYPE_HELP = 8 293 296 294 297 ## Message type: visibility messages 295 MESSAGETYPE_VISIBILITY = 8298 MESSAGETYPE_VISIBILITY = 9 296 299 297 300 #------------------------------------------------------------------------------- … … 299 302 messageTypes = [ MESSAGETYPE_LOGGER_ERROR, 300 303 MESSAGETYPE_INFORMATION, 304 MESSAGETYPE_INFLIGHT, 301 305 MESSAGETYPE_FAULT, 302 306 MESSAGETYPE_NOGO, … … 310 314 _messageTypeStrings = { MESSAGETYPE_LOGGER_ERROR : "loggerError", 311 315 MESSAGETYPE_INFORMATION : "information", 316 MESSAGETYPE_INFLIGHT : "inflight", 312 317 MESSAGETYPE_FAULT : "fault", 313 318 MESSAGETYPE_NOGO : "nogo", -
src/mlx/fs.py
r314 r315 120 120 121 121 def _sendMessage(self, messageType, text, duration, disconnect): 122 """Send the message and setup the next message time.""" 122 """Send the message and setup the next message time.""" 123 123 messageLevel = self._config.getMessageTypeLevel(messageType) 124 124 if messageLevel==const.MESSAGELEVEL_SOUND or \ … … 135 135 self._simulator.sendMessage("[MLX] " + text, 136 136 duration = duration) 137 elif disconnect e:137 elif disconnect: 138 138 self._simulator.disconnect() 139 139 self._nextMessageTime = time.time() + duration -
src/mlx/fsuipc.py
r314 r315 676 676 677 677 duration is the number of seconds to keep the message displayed.""" 678 678 679 print "fsuipc.Simulator.sendMessage:", message 680 679 681 if self._scroll: 680 682 if duration==0: duration = -1 -
src/mlx/logger.py
r298 r315 91 91 self.untimedMessage("Rating: %.0f" % (self.getRating(),)) 92 92 else: 93 sendMessage(const.MESSAGETYPE_INFORMATION, "Flight stage: " + s, 3) 93 messageType = \ 94 const.MESSAGETYPE_INFLIGHT if stage in \ 95 [const.STAGE_CLIMB, const.STAGE_CRUISE, \ 96 const.STAGE_DESCENT, const.STAGE_LANDING] \ 97 else const.MESSAGETYPE_INFORMATION 98 sendMessage(messageType, "Flight stage: " + s, 3) 94 99 95 100 def fault(self, faultID, timestamp, what, score):
Note:
See TracChangeset
for help on using the changeset viewer.