Ignore:
Timestamp:
03/14/22 09:58:58 (2 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
python3
hg-Phase:
(<MercurialRepository 1 'hg:/home/ivaradi/mlx/hg' '/'>, 'public')
Message:

Updated the flight type handling (re #357)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/flight.py

    r1033 r1034  
    5454
    5555    @staticmethod
    56     def isTimeDifferenceTooMuch(scheduledTime, realTimestamp):
     56    def isTimeDifferenceTooMuch(scheduledTime, realTimestamp,
     57                                earlyOnlyWarning = False):
    5758        """Determine if the given real time differs to much from the scheduled
    5859        time.
     
    7172
    7273        return (diff>Flight.TIME_WARNING_DIFFERENCE,
    73                 diff>Flight.TIME_ERROR_DIFFERENCE)
     74                False if earlyOnlyWarning else diff>Flight.TIME_ERROR_DIFFERENCE)
    7475
    7576    def __init__(self, logger, gui):
     
    385386          but an error as well."""
    386387        return self.isTimeDifferenceTooMuch(self.bookedFlight.arrivalTime,
    387                                             self.blockTimeEnd)
     388                                            self.blockTimeEnd,
     389                                            earlyOnlyWarning = True)
    388390
    389391    def disconnected(self):
Note: See TracChangeset for help on using the changeset viewer.