Ignore:
Timestamp:
04/30/12 13:15:14 (12 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

The general message sending works and the most important messages are sent

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/logger.py

    r97 r133  
    33#--------------------------------------------------------------------------------------
    44
     5from fs import sendMessage
    56import const
    67import util
     
    7475        if stage==const.STAGE_END:
    7576            self.untimedMessage("Rating: %.0f" % (self.getRating(),))
     77        sendMessage(const.MESSAGETYPE_INFORMATION, "Flight stage: " + s, 3)
    7678       
    7779    def fault(self, faultID, timestamp, what, score):
     
    8789        self._faults[faultID] = score
    8890        if score==Logger.NO_GO_SCORE:
    89             lineIndex = self.message(timestamp, "%s (NO GO)" % (what))
     91            text = "%s (NO GO)" % (what)
    9092        else:
    91             lineIndex = self.message(timestamp, "%s (%.1f)" % (what, score))
     93            text = "%s (%.1f)" % (what, score)
     94        lineIndex = self.message(timestamp, "%s (NO GO)" % (what))
    9295        self._faultLineIndexes.append(lineIndex)
     96        (messageType, duration) = (const.MESSAGETYPE_NOGO, 10) \
     97                                  if score==Logger.NO_GO_SCORE \
     98                                  else (const.MESSAGETYPE_FAULT, 5)
     99        sendMessage(messageType, text, duration)           
    93100
    94101    def noGo(self, faultID, timestamp, what):
Note: See TracChangeset for help on using the changeset viewer.