Changeset 634:b695e9445e24


Ignore:
Timestamp:
05/10/15 06:44:20 (10 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

A go-around is logged as a fault with no score and an explanation is required (re #266)

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • locale/en/mlx.po

    r607 r634  
    968968msgid "finish_help_faults"
    969969msgstr ""
    970 "<span foreground=\"red\">\n\nYou had one or more faults during your flight. Please, provide some\n"
     970"<span foreground=\"red\">\n\nWe observed some faults or unusual activities during your flight. Please, provide some\n"
    971971"explanation on the Flight info tab before sending the PIREP.</span>"
    972972
     
    10781078
    10791079msgid "info_faults"
    1080 msgstr "F_aults"
     1080msgstr "F_aults, observations"
    10811081
    10821082msgid "info_delay"
  • locale/hu/mlx.po

    r607 r634  
    969969msgid "finish_help_faults"
    970970msgstr ""
    971 "<span foreground=\"red\">\n\nA repülés során vétettél egy vagy több hibát. Kérlek, a Járat info oldalon\n"
    972 "írj ezekre magyarázatot a Járat info oldalon a PIREP elküldése előtt.</span>"
     971"<span foreground=\"red\">\n\nA repülés során hibát vagy szokatlan jelenséget figyeltünk meg. Kérlek, a Járat info oldalon\n"
     972"írj ezekre magyarázatot a PIREP elküldése előtt.</span>"
    973973
    974974msgid "finish_help_wrongtime"
     
    10811081
    10821082msgid "info_faults"
    1083 msgstr "_Hibák"
     1083msgstr "_Hibák, megfigyelések"
    10841084
    10851085msgid "info_delay"
  • src/mlx/acft.py

    r631 r634  
    374374                if newStage==const.STAGE_LANDING:
    375375                    self._logQNH(aircraftState)
     376            elif newStage==const.STAGE_GOAROUND:
     377                from logger import Logger
     378                self._flight.handleFault("goaround",
     379                                         aircraftState.timestamp,
     380                                         "Go-around detected, please, explain!",
     381                                         Logger.NO_SCORE)
    376382            elif newStage==const.STAGE_TAXIAFTERLAND:
    377383                flight = self._flight
  • src/mlx/logger.py

    r604 r634  
    186186    NO_GO_SCORE = 10000
    187187
     188    NO_SCORE = 9999
     189
    188190    def __init__(self, output):
    189191        """Construct the logger."""
     
    271273        fault = self._faults[faultID] if faultID in self._faults else None
    272274
     275        text = "%s (NO GO)" % (what) if score==Logger.NO_GO_SCORE \
     276               else "%s" % (what,) if score==Logger.NO_SCORE \
     277               else "%s (%.1f)" % (what, score)
     278
     279        if score==Logger.NO_SCORE:
     280            score = 0
     281
    273282        if fault is not None and score<=fault.score:
    274283            return fault.getLatestEntry().id if updatePrevious else -1
    275 
    276         text = "%s (NO GO)" % (what) if score==Logger.NO_GO_SCORE \
    277                else "%s (%.1f)" % (what, score)
    278284
    279285        if updatePrevious and fault is not None:
Note: See TracChangeset for help on using the changeset viewer.