def __init__(self, session): Screen.__init__(self, session) self["CurrentService"] = CurrentService(session.nav) self["CurrentTime"] = Clock() self["Event_Now"] = EventInfo(session.nav, EventInfo.NOW) self["Event_Next"] = EventInfo(session.nav, EventInfo.NEXT) self["FrontendStatus"] = FrontendStatus(service_source=session.nav.getCurrentService) self["FrontendInfo"] = FrontendInfo(navcore=session.nav) self["VideoPicture"] = Source() self["TunerInfo"] = TunerInfo() self["RecordState"] = RecordState(session) self["Standby"] = Boolean(fixed=False) from Components.SystemInfo import BoxInfo combine = Combine(func=lambda s: {(False, False): 0, (False, True): 1, (True, False): 2, (True, True): 3}[(s[0].boolean, s[1].boolean)]) combine.connect(self["Standby"]) combine.connect(self["RecordState"]) # | two leds | single led | # recordstate standby red green # false false off on off # true false blnk on blnk # false true on off off # true true blnk off blnk PATTERN_ON = (20, 0xffffffff, 0xffffffff) PATTERN_OFF = (20, 0, 0) PATTERN_BLINK = (20, 0x55555555, 0xa7fccf7a) have_display = BoxInfo.getItem("FrontpanelDisplay", False) have_touch_sensor = BoxInfo.getItem("HaveTouchSensor", False) nr_leds = BoxInfo.getItem("NumFrontpanelLEDs", 0) if nr_leds == 1: FrontpanelLed(which=0, boolean=False, patterns=[PATTERN_OFF if have_display else PATTERN_ON, PATTERN_BLINK, PATTERN_OFF, PATTERN_BLINK]).connect(combine) elif nr_leds == 2: if have_touch_sensor: FrontpanelLed(which=0, boolean=False, patterns=[PATTERN_ON, PATTERN_BLINK, PATTERN_OFF, PATTERN_BLINK]).connect(combine) FrontpanelLed(which=1, boolean=False, patterns=[PATTERN_OFF, PATTERN_OFF, PATTERN_OFF, PATTERN_OFF]).connect(combine) else: FrontpanelLed(which=0, boolean=False, patterns=[PATTERN_OFF, PATTERN_BLINK, PATTERN_ON, PATTERN_BLINK]).connect(combine) FrontpanelLed(which=1, boolean=False, patterns=[PATTERN_ON, PATTERN_ON, PATTERN_OFF, PATTERN_OFF]).connect(combine)
def __init__(self, session, request): WebScreen.__init__(self, session, request) from Components.Sources.Clock import Clock self["CurrentTime"] = Clock() from WebComponents.Sources.Volume import Volume self["Volume"] = Volume(session)
def __init__(self): Screen.__init__(self, None) self["CurrentTime"] = Clock() self["OnlineStableUpdateState"] = OnlineUpdateStableCheck() self["OnlineUnstableUpdateState"] = OnlineUpdateUnstableCheck()
def __init__(self): Screen.__init__(self, None) self['CurrentTime'] = Clock() self['OnlineStableUpdateState'] = OnlineUpdateStableCheck() self['OnlineUnstableUpdateState'] = OnlineUpdateUnstableCheck() return
def __init__(self, session): Screen.__init__(self, session) self['CurrentService'] = CurrentService(session.nav) self['CurrentTime'] = Clock() self['Event_Now'] = EventInfo(session.nav, EventInfo.NOW) self['Event_Next'] = EventInfo(session.nav, EventInfo.NEXT) self['FrontendStatus'] = FrontendStatus( service_source=session.nav.getCurrentService) self['FrontendInfo'] = FrontendInfo(navcore=session.nav) self['VideoPicture'] = Source() self['TunerInfo'] = TunerInfo() self['RecordState'] = RecordState(session) self['Standby'] = Boolean(fixed=False) from Components.SystemInfo import SystemInfo combine = Combine(func=lambda s: { (False, False): 0, (False, True): 1, (True, False): 2, (True, True): 3 }[s[0].boolean, s[1].boolean]) combine.connect(self['Standby']) combine.connect(self['RecordState']) PATTERN_ON = (20, 4294967295, 4294967295) PATTERN_OFF = (20, 0, 0) PATTERN_BLINK = (20, 1431655765, 2818363258) have_display = SystemInfo.get('FrontpanelDisplay', False) have_touch_sensor = SystemInfo.get('HaveTouchSensor', False) nr_leds = SystemInfo.get('NumFrontpanelLEDs', 0) if nr_leds == 1: FrontpanelLed(which=0, boolean=False, patterns=[ PATTERN_OFF if have_display else PATTERN_ON, PATTERN_BLINK, PATTERN_OFF, PATTERN_BLINK ]).connect(combine) elif nr_leds == 2: if have_touch_sensor: FrontpanelLed(which=0, boolean=False, patterns=[ PATTERN_ON, PATTERN_BLINK, PATTERN_OFF, PATTERN_BLINK ]).connect(combine) FrontpanelLed(which=1, boolean=False, patterns=[ PATTERN_OFF, PATTERN_OFF, PATTERN_OFF, PATTERN_OFF ]).connect(combine) else: FrontpanelLed(which=0, boolean=False, patterns=[ PATTERN_OFF, PATTERN_BLINK, PATTERN_ON, PATTERN_BLINK ]).connect(combine) FrontpanelLed(which=1, boolean=False, patterns=[ PATTERN_ON, PATTERN_ON, PATTERN_OFF, PATTERN_OFF ]).connect(combine)
def __init__(self): Screen.__init__(self, None) self['CurrentTime'] = Clock() return
def __init__(self): Screen.__init__(self, None) self["CurrentTime"] = Clock()