Esempio n. 1
0
    def __init__(self, parent=None):
        super(Screen, self).__init__(parent)
        self.parent = parent
        p = self.parent.palette()

        self.screenColor = (0, 0, 0)
        if self.screenColor:
            p.setColor(self.backgroundRole(), QColor(*self.screenColor))
            self.setPalette(p)
            self.setAutoFillBackground(True)

        self.ai = VirtualVfr(self)
        self.ai.fontSize = 20
        self.ai.pitchDegreesShown = 90

        self.alt_tape = altimeter.Altimeter_Tape(self)
        self.alt_Trend = vsi.Alt_Trend_Tape(self)
        self.as_tape = airspeed.Airspeed_Tape(self)
        #self.as_Trend = vsi.AS_Trend_Tape(self)
        self.asd_Box = airspeed.Airspeed_Mode(self)
        #self.parent.change_asd_mode.connect(self.change_asd_mode)
        self.hsi = hsi.HSI(self, font_size=12, fgcolor="#0030FF")
        self.heading_disp = hsi.HeadingDisplay(self,
                                               font_size=12,
                                               fgcolor="#0030FF")
        self.alt_setting = altimeter.Altimeter_Setting(self)
        self.check_engine = CheckEngine(self)
        self.tc = tc.TurnCoordinator(self, dial=False)
Esempio n. 2
0
    def __init__(self, parent=None):
        super(Screen, self).__init__(parent)
        self.parent = parent
        p = self.parent.palette()

        self.screenColor = (0,0,0)
        if self.screenColor:
            p.setColor(self.backgroundRole(), QColor(*self.screenColor))
            self.setPalette(p)
            self.setAutoFillBackground(True)

        self.ai = VirtualVfr(self)
        self.ai.fontSize = 20
        self.ai.pitchDegreesShown = 90

        self.alt_tape = altimeter.Altimeter_Tape(self)
        self.alt_Trend = vsi.Alt_Trend_Tape(self)
        self.as_tape = airspeed.Airspeed_Tape(self)
        #self.as_Trend = vsi.AS_Trend_Tape(self)
        self.asd_Box = airspeed.Airspeed_Mode(self)
        #self.parent.change_asd_mode.connect(self.change_asd_mode)
        self.hsi = hsi.HSI(self, font_size=12, fgcolor="#0030FF")
        self.heading_disp = hsi.HeadingDisplay(self, font_size=12, fgcolor="#0030FF")
        self.alt_setting = gauges.NumericDisplay(self)
        self.alt_setting.dbkey = "BARO"
        self.alt_setting.decimalPlaces = 2
        self.tc = tc.TurnCoordinator(self, dial=False)

        self.map_g = gauges.ArcGauge(self)
        self.map_g.name = "MAP"
        self.map_g.decimalPlaces = 1
        self.map_g.dbkey = "MAP1"

        self.rpm = gauges.ArcGauge(self)
        self.rpm.name = "RPM"
        self.rpm.decimalPlaces = 0
        self.rpm.dbkey = "TACH1"

        self.op = gauges.HorizontalBar(self)
        self.op.name = "Oil Press"
        self.op.decimalPlaces = 1
        self.op.dbkey = "OILP1"


        self.ot = gauges.HorizontalBar(self)
        self.ot.name = "Oil Temp"
        # Use a lambda to convert the values internally
        self.ot.conversionFunction1 = lambda x: x * (9.0/5.0) + 32.0
        self.ot.conversionFunction2 = lambda x: x
        # This causes the units sent from the server to be overridden
        self.ot.unitsOverride1 = u'\N{DEGREE SIGN}F'
        self.ot.unitsOverride2 = u'\N{DEGREE SIGN}C'
        self.ot.setUnitSwitching()
        self.ot.dbkey = "OILT1"


        self.fuel = gauges.HorizontalBar(self)
        self.fuel.name = "Fuel Qty"
        self.fuel.decimalPlaces = 1
        self.fuel.dbkey = "FUELQT"

        self.ff = gauges.HorizontalBar(self)
        self.ff.name = "Fuel Flow"
        self.ff.decimalPlaces = 1
        self.ff.dbkey = "FUELF1"

        self.cht = gauges.HorizontalBar(self)
        self.cht.name = "Max CHT"
        # Use a lambda to convert the values internally
        self.cht.conversionFunction1 = lambda x: x * (9.0/5.0) + 32.0
        self.cht.conversionFunction2 = lambda x: x
        # This causes the units sent from the server to be overridden
        self.cht.unitsOverride1 = u'\N{DEGREE SIGN}F'
        self.cht.unitsOverride2 = u'\N{DEGREE SIGN}C'
        self.cht.unitGroup = "Temperature"
        self.cht.setUnitSwitching()
        self.cht.dbkey = "CHTMAX1"

        self.egt = gauges.HorizontalBar(self)
        self.egt.name = "Avg EGT"
        # Use a lambda to convert the values internally
        self.egt.conversionFunction1 = lambda x: x * (9.0/5.0) + 32.0
        self.egt.conversionFunction2 = lambda x: x
        # This causes the units sent from the server to be overridden
        self.egt.unitsOverride1 = u'\N{DEGREE SIGN}F'
        self.egt.unitsOverride2 = u'\N{DEGREE SIGN}C'
        self.egt.unitGroup = "Temperature"
        self.egt.setUnitSwitching()
        self.egt.decimalPlaces = 0
        self.egt.dbkey = "EGTAVG1"