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

Added support for the landing lights and the NAV frequencies being unreliable and the Digital Aviation F70 model

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/gui/monitor.py

    r300 r314  
    191191
    192192        self.add(alignment)
     193
     194        self._previousState = None
    193195
    194196        self.setData()
     
    249251            self._antiCollisionLightsOn.set_sensitive(False)
    250252            self._strobeLightsOn.set_sensitive(False)
     253            self._landingLightsOn.set_text("LANDING")
    251254            self._landingLightsOn.set_sensitive(False)
    252255            self._pitotHeatOn.set_sensitive(False)
     
    285288            self._altimeter.set_text("%.0f" % (aircraftState.altimeter,))
    286289            self._squawk.set_text(aircraftState.squawk)
    287             self._nav1.set_text(aircraftState.nav1)
    288             self._nav2.set_text(aircraftState.nav2)
     290            self._nav1.set_text("-" if aircraftState.nav1 is None else aircraftState.nav1)
     291            self._nav2.set_text("-" if aircraftState.nav2 is None else aircraftState.nav2)
    289292
    290293            fuelStr = ""
     
    317320            self._antiCollisionLightsOn.set_sensitive(aircraftState.antiCollisionLightsOn)
    318321            self._strobeLightsOn.set_sensitive(aircraftState.strobeLightsOn)
    319             self._landingLightsOn.set_sensitive(aircraftState.landingLightsOn)
     322
     323            if self._previousState is None or \
     324               ((self._previousState.landingLightsOn is None)!=
     325                (aircraftState.landingLightsOn is None)):
     326                if aircraftState.landingLightsOn is None:
     327                    self._landingLightsOn.set_markup('<span strikethrough="true">LANDING</span>')
     328                else:
     329                    self._landingLightsOn.set_text("LANDING")
     330            self._landingLightsOn.set_sensitive(aircraftState.landingLightsOn is True)
     331           
    320332            self._pitotHeatOn.set_sensitive(aircraftState.pitotHeatOn)
    321333            self._parking.set_sensitive(aircraftState.parking)
Note: See TracChangeset for help on using the changeset viewer.