Ignore:
Timestamp:
11/15/12 16:51:42 (12 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

#138: added the reading of the AP data and its displaying in the monitor window

File:
1 edited

Legend:

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

    r334 r337  
    3737                              padding_left = 16, padding_right = 16)
    3838
    39         table = gtk.Table(rows = 7, columns = 12)
     39        table = gtk.Table(rows = 7, columns = 14)
    4040        table.set_homogeneous(False)
    4141        table.set_row_spacings(4)
     
    190190        self._xpdrC = gtk.Label("XPDR CHARLIE")
    191191        table.attach(self._xpdrC, 10, 12, 6, 7)
     192
     193        self._apMaster = gtk.Label("AP MASTER")
     194        table.attach(self._apMaster, 0, 1, 7, 8)
     195
     196        self._apHeadingHold = gtk.Label("AP HDG HOLD")
     197        table.attach(self._apHeadingHold, 1, 2, 7, 8)
     198
     199        (label, self._apHeading) = self._createLabeledEntry("AP HDG:", 5)
     200        table.attach(label, 2, 3, 7, 8)
     201        table.attach(self._apHeading, 3, 4, 7, 8)
     202
     203        self._apAltitudeHold = gtk.Label("AP ALT HOLD")
     204        table.attach(self._apAltitudeHold, 5, 6, 7, 8)
     205
     206        (label, self._apAltitude) = self._createLabeledEntry("AP ALT:", 10)
     207        table.attach(label, 6, 7, 7, 8)
     208        table.attach(self._apAltitude, 7, 8, 7, 8)
    192209
    193210        alignment.add(table)
     
    266283            self._position.set_text("-")
    267284            self._xpdrC.set_sensitive(False)
     285            self._apMaster.set_sensitive(False)
     286            self._apHeadingHold.set_sensitive(False)
     287            self._apHeading.set_text("-")
     288            self._apAltitudeHold.set_sensitive(False)
     289            self._apAltitude.set_text("-")
    268290        else:
    269291            self._timestamp.set_text(time.strftime("%H:%M:%S",
     
    346368            self._xpdrC.set_sensitive(aircraftState.xpdrC)
    347369
     370            self._apMaster.set_sensitive(aircraftState.apMaster)
     371            self._apHeadingHold.set_sensitive(aircraftState.apHeadingHold)
     372            self._apHeading.set_text("%03.0f" % (aircraftState.apHeading,))
     373            self._apAltitudeHold.set_sensitive(aircraftState.apAltitudeHold)
     374            self._apAltitude.set_text("%5.0f" % (aircraftState.apAltitude,))
     375
    348376#------------------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.