Changeset 919:2ce8ca39525b for src/mlx/checks.py
- Timestamp:
- 03/24/19 08:15:59 (5 years ago)
- Branch:
- python3
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/checks.py
r912 r919 1 1 2 import fs3 import const4 import util5 from acars import ACARS6 from sound import startSound2 from . import fs 3 from . import const 4 from . import util 5 from .acars import ACARS 6 from .sound import startSound 7 7 8 8 import time … … 129 129 """Callback for ACARS sending.""" 130 130 if returned: 131 print "Sent online ACARS"131 print("Sent online ACARS") 132 132 self._lastSent = time.time() if self._lastSent is None \ 133 133 else self._lastSent + ACARSSender.INTERVAL 134 134 else: 135 print "Failed to send the ACARS"135 print("Failed to send the ACARS") 136 136 self._sending = False 137 137 … … 517 517 def getMessage(logName, frequency, obs): 518 518 """Get the message for the given NAV radio setting.""" 519 message = u"%-5s %s" % (logName + ":", frequency)520 if obs is not None: message += u" (%03d\u00b0)" % (obs,)519 message = "%-5s %s" % (logName + ":", frequency) 520 if obs is not None: message += " (%03d\u00b0)" % (obs,) 521 521 return message 522 522 … … 747 747 message = what 748 748 if value is None: 749 message += u" cannot be detected, will not log"749 message += " cannot be detected, will not log" 750 750 else: 751 message += u": " + format % (value,)751 message += ": " + format % (value,) 752 752 logger.message(timestamp, message) 753 753 … … 767 767 def _logAPHeading(logger, timestamp, state): 768 768 """Log the AP heading.""" 769 APLogger._logNumeric(logger, timestamp, u"AP heading",770 u"%03.0f\u00b0", state.apHeading)769 APLogger._logNumeric(logger, timestamp, "AP heading", 770 "%03.0f\u00b0", state.apHeading) 771 771 772 772 @staticmethod … … 779 779 def _logAPAltitude(logger, timestamp, state): 780 780 """Log the AP heading.""" 781 APLogger._logNumeric(logger, timestamp, u"AP altitude",782 u"%.0f ft", state.apAltitude)781 APLogger._logNumeric(logger, timestamp, "AP altitude", 782 "%.0f ft", state.apAltitude) 783 783 784 784 def __init__(self):
Note:
See TracChangeset
for help on using the changeset viewer.