Changeset 315:baa139ef7784


Ignore:
Timestamp:
09/30/12 07:16:34 (12 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

The in-flight stage messages can be controlled separately

Files:
6 edited

Legend:

Unmodified
Added
Removed
  • locale/en/mlx.po

    r309 r315  
    14561456"(e.g. flight stage)"
    14571457
     1458msgid "prefs_msgs_type_inflight"
     1459msgstr "In-f_light Stage Messages"
     1460
    14581461msgid "prefs_msgs_type_fault"
    14591462msgstr ""
  • locale/hu/mlx.po

    r309 r315  
    14701470"(pl. a repülés fázisa)"
    14711471
     1472msgid "prefs_msgs_type_inflight"
     1473msgstr ""
     1474"Repülés alatti _fázis\n"
     1475"üzenetek"
     1476
    14721477msgid "prefs_msgs_type_fault"
    14731478msgstr ""
  • src/mlx/const.py

    r308 r315  
    276276MESSAGETYPE_INFORMATION = 2
    277277
     278## Message type: in-flight information
     279MESSAGETYPE_INFLIGHT = 3
     280
    278281## Message type: fault messages
    279 MESSAGETYPE_FAULT = 3
     282MESSAGETYPE_FAULT = 4
    280283
    281284## Message type: NO-GO fault messages
    282 MESSAGETYPE_NOGO = 4
     285MESSAGETYPE_NOGO = 5
    283286
    284287## Message type: gate system messages
    285 MESSAGETYPE_GATE_SYSTEM = 5
     288MESSAGETYPE_GATE_SYSTEM = 6
    286289
    287290## Message type: environment messages
    288291# FIXME: flight plan closed (5 sec)
    289 MESSAGETYPE_ENVIRONMENT = 6
     292MESSAGETYPE_ENVIRONMENT = 7
    290293
    291294## Message type: help messages
    292 MESSAGETYPE_HELP = 7
     295MESSAGETYPE_HELP = 8
    293296
    294297## Message type: visibility messages
    295 MESSAGETYPE_VISIBILITY = 8
     298MESSAGETYPE_VISIBILITY = 9
    296299
    297300#-------------------------------------------------------------------------------
     
    299302messageTypes = [ MESSAGETYPE_LOGGER_ERROR,
    300303                 MESSAGETYPE_INFORMATION,
     304                 MESSAGETYPE_INFLIGHT,
    301305                 MESSAGETYPE_FAULT,
    302306                 MESSAGETYPE_NOGO,
     
    310314_messageTypeStrings = { MESSAGETYPE_LOGGER_ERROR : "loggerError",
    311315                        MESSAGETYPE_INFORMATION : "information",
     316                        MESSAGETYPE_INFLIGHT : "inflight",
    312317                        MESSAGETYPE_FAULT : "fault",
    313318                        MESSAGETYPE_NOGO : "nogo",
  • src/mlx/fs.py

    r314 r315  
    120120
    121121    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."""       
    123123        messageLevel = self._config.getMessageTypeLevel(messageType)
    124124        if messageLevel==const.MESSAGELEVEL_SOUND or \
     
    135135                self._simulator.sendMessage("[MLX] " + text,
    136136                                            duration = duration)
    137         elif disconnecte:
     137        elif disconnect:
    138138            self._simulator.disconnect()
    139139        self._nextMessageTime = time.time() + duration
  • src/mlx/fsuipc.py

    r314 r315  
    676676
    677677        duration is the number of seconds to keep the message displayed."""
    678        
     678
     679        print "fsuipc.Simulator.sendMessage:", message
     680
    679681        if self._scroll:
    680682            if duration==0: duration = -1
  • src/mlx/logger.py

    r298 r315  
    9191            self.untimedMessage("Rating: %.0f" % (self.getRating(),))
    9292        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)
    9499       
    95100    def fault(self, faultID, timestamp, what, score):
Note: See TracChangeset for help on using the changeset viewer.