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"
def __init__(self, parent=None): super(Screen, self).__init__(parent) self.parent = parent p = self.parent.palette() self.cylCount = 4 self.screenColor = (0, 0, 0) if self.screenColor: p.setColor(self.backgroundRole(), QColor(*self.screenColor)) self.setPalette(p) self.setAutoFillBackground(True) self.rpm = gauges.ArcGauge(self) self.rpm.name = "RPM" self.rpm.decimalPlaces = 0 self.rpm.dbkey = "TACH1" self.map_g = gauges.ArcGauge(self) self.map_g.name = "MAP" self.map_g.decimalPlaces = 1 self.map_g.dbkey = "MAP1" 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.decimalPlaces = 1 self.ot.dbkey = "OILT1" self.fuel = misc.StaticText("Fuel", parent=self) self.fuell = gauges.VerticalBar(self) self.fuell.name = "Left" self.fuell.decimalPlaces = 1 self.fuell.showUnits = False self.fuell.dbkey = "FUELQ1" self.fuelr = gauges.VerticalBar(self) self.fuelr.name = "Right" self.fuelr.decimalPlaces = 1 self.fuelr.showUnits = False self.fuelr.dbkey = "FUELQ2" self.ff = gauges.VerticalBar(self) self.ff.name = "Flow" self.ff.decimalPlaces = 1 self.ff.showUnits = False self.ff.dbkey = "FUELF1" self.fuelp = gauges.VerticalBar(self) self.fuelp.name = "Press" self.fuelp.decimalPlaces = 0 self.fuelp.showUnits = False self.fuelp.dbkey = "FUELP1" self.fuelt = gauges.NumericDisplay(self) self.fuelt.name = "Total" self.fuelt.decimalPlaces = 1 self.fuelt.dbkey = "FUELQT" self.fuelt.showUnits = False self.fuelt.showName = False self.volts = gauges.VerticalBar(self) self.volts.name = "Volt" self.volts.decimalPlaces = 1 self.volts.showUnits = False self.volts.dbkey = "VOLT" self.current = gauges.VerticalBar(self) self.current.name = "Amp" self.current.decimalPlaces = 1 self.current.showUnits = False self.current.dbkey = "CURRNT" self.cht = misc.StaticText("CHT", parent=self) self.chts = [] for x in range(self.cylCount): cht = gauges.VerticalBar(self) cht.name = str(x + 1) cht.decimalPlaces = 0 cht.conversionFunction1 = lambda x: x * (9.0 / 5.0) + 32.0 cht.conversionFunction2 = lambda x: x #cht.unitsOverride1 = u'\N{DEGREE SIGN}F' #cht.unitsOverride2 = u'\N{DEGREE SIGN}C' cht.unitGroup = "Temperature" cht.setUnitSwitching() cht.showUnits = False cht.dbkey = "CHT1{}".format(x + 1) self.chts.append(cht) item = fix.db.get_item(cht.dbkey) item.valueChanged.connect(self.chtMax) self.chtmaxlabel = misc.StaticText("MAX", parent=self) self.chtmax = gauges.NumericDisplay(self) self.chtmax.name = "CHT Max" self.chtmax.decimalPlaces = 0 self.chtmax.conversionFunction1 = lambda x: x * (9.0 / 5.0) + 32.0 self.chtmax.conversionFunction2 = lambda x: x self.chtmax.unitsOverride1 = u'\N{DEGREE SIGN}F' self.chtmax.unitsOverride2 = u'\N{DEGREE SIGN}C' self.chtmax.setUnitSwitching() self.chtmax.unitGroup = "Temperature" self.chtmax.dbkey = "CHTMAX1" self.egt = misc.StaticText("EGT", parent=self) self.egtgroup = gauges.EGTGroup(self, self.cylCount, ["EGT11", "EGT12", "EGT13", "EGT14"]) self.hobbslabel = misc.StaticText("Engine Time", parent=self) self.hobbs = gauges.NumericDisplay(self) self.hobbs.name = "Hobbs" self.hobbs.decimalPlaces = 1 self.hobbs.dbkey = "HOBBS1" self.hobbs.alignment = Qt.AlignRight | Qt.AlignVCenter self.hobbs.showUnits = True self.hobbs.smallFontPercent = 0.6 self.oatlabel = misc.StaticText("OAT", parent=self) self.oatlabel.alignment = Qt.AlignLeft | Qt.AlignVCenter self.oat = gauges.NumericDisplay(self) self.oat.name = "OAT" self.oat.decimalPlaces = 1 self.oat.dbkey = "OAT" self.oat.alignment = Qt.AlignLeft | Qt.AlignVCenter self.oat.conversionFunction1 = lambda x: x * (9.0 / 5.0) + 32.0 self.oat.conversionFunction2 = lambda x: x self.oat.unitsOverride1 = u'\N{DEGREE SIGN}F' self.oat.unitsOverride2 = u'\N{DEGREE SIGN}C' self.oat.showUnits = True self.oat.setUnitSwitching() self.oat.smallFontPercent = 0.6 self.timez = misc.ValueDisplay(self) self.timez.dbkey = "TIMEZ"
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 = ai.AI(self) self.ai.fontSize = 19 self.ai.bankMarkSize = 10 self.ai.pitchDegreesShown = 60 self.ai.bankAngleRadius = 150 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.head_tape = hsi.DG_Tape(self) #self.alt_setting = altimeter.Altimeter_Setting(self) 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"