Changeset 680:965523af85d4 for src/mlx


Ignore:
Timestamp:
09/17/15 07:12:01 (9 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Children:
681:6d454f3c68c8, 722:229787f24665
Phase:
public
Message:

Added the ILS frequency and the various courses to the data monitor

File:
1 edited

Legend:

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

    r678 r680  
    230230        table.attach(label, 2, 3, 8, 9)
    231231        table.attach(self._cog, 3, 4, 8, 9)
     232
     233        (label, self._ils) = self._createLabeledEntry("ILS:", 7)
     234        table.attach(label, 4, 5, 8, 9)
     235        table.attach(self._ils, 5, 6, 8, 9)
     236
     237        (label, self._crs1) = self._createLabeledEntry("CRS1:", 7)
     238        table.attach(label, 6, 7, 8, 9)
     239        table.attach(self._crs1, 7, 8, 8, 9)
     240
     241        (label, self._crs2) = self._createLabeledEntry("CRS2:", 7)
     242        table.attach(label, 8, 9, 8, 9)
     243        table.attach(self._crs2, 9, 10, 8, 9)
     244
     245        (label, self._crsi) = self._createLabeledEntry("CRSI:", 7)
     246        table.attach(label, 10, 11, 8, 9)
     247        table.attach(self._crsi, 11, 12, 8, 9)
    232248
    233249        alignment.add(table)
     
    317333            self._qnh.set_text("-")
    318334            self._cog.set_text("-")
     335            self._ils.set_text("-")
     336            self._crs1.set_text("-")
     337            self._crs2.set_text("-")
     338            self._crsi.set_text("-")
    319339        else:
    320340            self._timestamp.set_text(time.strftime("%H:%M:%S",
     
    411431            self._cog.set_text("%.2f%%" % (aircraftState.cog*100.0,))
    412432
     433            self._ils.set_text("-" if aircraftState.ils is None else aircraftState.ils)
     434
     435            self._crs1.set_text("-" if aircraftState.nav1_obs is None else str(aircraftState.nav1_obs))
     436            self._crs2.set_text("-" if aircraftState.nav2_obs is None else str(aircraftState.nav2_obs))
     437            self._crsi.set_text("-" if aircraftState.ils_obs is None else str(aircraftState.ils_obs))
     438
    413439#------------------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.