From: Chang.H.S Date: Thu, 9 Jun 2011 09:39:30 +0000 (+0900) Subject: Merge branch 'FactoryTest' into vuplus_experimental X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=commitdiff_plain;h=8afa7e85987d47999fed964a09c371808296cc13;hp=c62237cf0a62d5200a666dcb02ae6091cdba4dbb Merge branch 'FactoryTest' into vuplus_experimental --- diff --git a/lib/python/Plugins/SystemPlugins/FactoryTest/plugin.py b/lib/python/Plugins/SystemPlugins/FactoryTest/plugin.py index 484749f..fbc61b1 100755 --- a/lib/python/Plugins/SystemPlugins/FactoryTest/plugin.py +++ b/lib/python/Plugins/SystemPlugins/FactoryTest/plugin.py @@ -123,7 +123,7 @@ class FactoryTest(Screen): }, -2) Screen.__init__(self, session) - TESTPROGRAM_DATE = "2011-05-16" + TESTPROGRAM_DATE = "2011-06-09" TESTPROGRAM_VERSION = "Version 01.10" self.model = 0 @@ -255,13 +255,13 @@ class FactoryTest(Screen): self.smarttestIndex=3 tlist.append((" 3. Smartcard test",self.smarttestIndex)) self.tuner1_1testIndex=4 - tlist.append((" 4. T1 H 22K x 4:3 CVBS",self.tuner1_1testIndex)) + tlist.append((" 4. T1/H/22K x /4:3/CVBS",self.tuner1_1testIndex)) self.tuner1_2testIndex=5 - tlist.append((" 5. T1 V 22k o 16:9 RGB",self.tuner1_2testIndex)) + tlist.append((" 5. T1/V/22k o/16:9/RGB",self.tuner1_2testIndex)) self.tuner2_1testIndex=6 - tlist.append((" 6. T2 H 22k x 4:3 YC",self.tuner2_1testIndex)) + tlist.append((" 6. T2/H/22k x/4:3/YC",self.tuner2_1testIndex)) self.tuner2_2testIndex=7 - tlist.append((" 7. T2 V 22k o 16:9 CVBS CAM",self.tuner2_2testIndex)) + tlist.append((" 7. T2/V/22k o/16:9/CVBS/CAM",self.tuner2_2testIndex)) self.scarttestIndex=8 tlist.append((" 8. VCR Scart loop",self.scarttestIndex)) self.rs232testIndex=9 @@ -271,7 +271,7 @@ class FactoryTest(Screen): self.fdefaultIndex=11 tlist.append(("11. Factory default",self.fdefaultIndex)) self.shutdownIndex=12 - tlist.append(("12. Shutdown",self.shutdownIndex)) + tlist.append(("12. Shutdown(Deep Standby)",self.shutdownIndex)) self.tuner_test_first_index = 4 self.tuner_test_last_index = 7 @@ -283,9 +283,9 @@ class FactoryTest(Screen): self.smarttestIndex=2 tlist.append((" 2. Smartcard test",self.smarttestIndex)) self.tuner1_1testIndex=3 - tlist.append((" 3. T1 H 22K x 4:3 CVBS",self.tuner1_1testIndex)) + tlist.append((" 3. T1/H/22K x/4:3/CVBS",self.tuner1_1testIndex)) self.tuner2_2testIndex = self.tuner1_2testIndex=4 - tlist.append((" 4. T1 V 22k o 16:9 RGB CAM",self.tuner1_2testIndex)) + tlist.append((" 4. T1/V/22k o/16:9/RGB/CAM",self.tuner1_2testIndex)) self.rs232testIndex=5 tlist.append((" 5. RS232 test",self.rs232testIndex)) self.ethernettestIndex=6 @@ -293,7 +293,7 @@ class FactoryTest(Screen): self.fdefaultIndex=7 tlist.append((" 7. Factory default",self.fdefaultIndex)) self.shutdownIndex=8 - tlist.append((" 8. Shutdown",self.shutdownIndex)) + tlist.append((" 8. Shutdown(Deep Standby)",self.shutdownIndex)) self.tuner_test_first_index = 3 self.tuner_test_last_index = 4 @@ -343,10 +343,10 @@ class FactoryTest(Screen): getRatio = AspectRatio.pop(0) # ratio AspectRatio.append(getRatio) getColorFormat=ColorFormat.pop(0) # colorFormat - menuname=" %d. T%d %s H 22k 0 %s %s" % (current_index, key+1, val["type"], getRatio, getColorFormat) #menuname + menuname=" %d. T%d/%s/H/22k x/%s/%s" % (current_index, key+1, val["type"], getRatio, getColorFormat) #menuname print current_index # current_index=4 - self.setTuneInfo(index=current_index, slot=key, type=val["type"], sat=val["sat1"], pol="H", tone=True, ratio=getRatio, color=getColorFormat, cam=False) # setTuneInfo + self.setTuneInfo(index=current_index, slot=key, type=val["type"], sat=val["sat1"], pol="H", tone=False, ratio=getRatio, color=getColorFormat, cam=False) # setTuneInfo # self.setTuneInfo(current_index, key, val["type"], val["sat1"], "H", True, getRatio, getColorFormat, False) # setTuneInfo tlist.append((menuname,current_index)) current_index+=1 @@ -354,13 +354,13 @@ class FactoryTest(Screen): getRatio = AspectRatio.pop(0) AspectRatio.append(getRatio) getColorFormat=ColorFormat.pop(0) - menuname=" %d. T%d %s V 22k x %s %s" % (current_index, key+1, val["type"], getRatio, getColorFormat) + menuname=" %d. T%d/%s/V/22k o/%s/%s" % (current_index, key+1, val["type"], getRatio, getColorFormat) if len(self.NimType) == key+1: # CAM test on/off - menuname+=" CAM" + menuname+="/CAM" camtest = True else: camtest = False - self.setTuneInfo( index=current_index, slot=key, type=val["type"], sat=val["sat2"], pol="V", tone=False, ratio=getRatio, color=getColorFormat, cam=camtest) + self.setTuneInfo( index=current_index, slot=key, type=val["type"], sat=val["sat2"], pol="V", tone=True, ratio=getRatio, color=getColorFormat, cam=camtest) tlist.append((menuname,current_index)) current_index+=1 # Chang : DVB -T or DVB-C @@ -374,7 +374,7 @@ class FactoryTest(Screen): getRatio = AspectRatio.pop(0) AspectRatio.append(getRatio) getColorFormat=ColorFormat.pop(0) - menuname=" %d. T%d %s %s %s" % (current_index, key+1, val["type"], getRatio, getColorFormat) + menuname=" %d. T%d/%s/%s/%s" % (current_index, key+1, val["type"], getRatio, getColorFormat) if len(self.NimType) == key+1 and (additionalMenu is None or x != 0): # CAM test on/off menuname+=" CAM" camtest = True @@ -394,7 +394,7 @@ class FactoryTest(Screen): tlist.append((" %d. Factory default" % current_index,self.fdefaultIndex)) current_index+=1 self.shutdownIndex=current_index - tlist.append((" %d. Shutdown" % current_index,self.shutdownIndex)) + tlist.append((" %d. Shutdown(Deep Standby)" % current_index,self.shutdownIndex)) self.menulength= len(tlist) self["testlist"] = MenuList(tlist) @@ -643,17 +643,17 @@ class FactoryTest(Screen): displayerror = 1 if result == 0: - self.session.open( MessageBox, _("Sata & extend hdd test pass"), MessageBox.TYPE_INFO) + self.session.open( MessageBox, _("Sata & extend hdd test pass\nPress 'OK' button!"), MessageBox.TYPE_INFO) self.rlist[self["testlist"].getCurrent()[1]]="pass" elif result == 1: if displayerror==1: - self.session.open( MessageBox, _("One hdd test error"), MessageBox.TYPE_ERROR) + self.session.open( MessageBox, _("One hdd test error\nPress 'EXIT' button!"), MessageBox.TYPE_ERROR) self.rlist[self["testlist"].getCurrent()[1]]="fail" else: self.satatimer.start(1100,True) else: if displayerror==1: - self.session.open( MessageBox, _("Sata & extend hdd test error"), MessageBox.TYPE_ERROR) + self.session.open( MessageBox, _("Sata & extend hdd test error\nPress 'EXIT' button!"), MessageBox.TYPE_ERROR) self.rlist[self["testlist"].getCurrent()[1]]="fail" else: self.satatimer.start(1100,True) @@ -664,7 +664,7 @@ class FactoryTest(Screen): elif self.model == 1: self.session.openWithCallback(self.displayresult ,FrontTest_solo) elif self.model == 2 or self.model == 3 or self.model == 4: - self.session.openWithCallback(self.displayresult ,FrontTest_solo) + self.session.openWithCallback(self.displayresult ,FrontTest_uno) def displayresult(self): global fronttest @@ -1070,11 +1070,11 @@ class FactoryTest(Screen): if result < 0 : result = 0 elif result == len(devices): - self.session.open( MessageBox, _("USB test pass %d devices\nPress OK!"%result), MessageBox.TYPE_INFO) + self.session.open( MessageBox, _("USB test pass %d devices\nPress 'OK' button!"%result), MessageBox.TYPE_INFO) self.rlist[self["testlist"].getCurrent()[1]]="pass" else: if displayerror == 1: - self.session.open( MessageBox, _("USB test error : Success-%d"%result+" Fail-%d\nPress EXIT!"%(len(devices)-result)), MessageBox.TYPE_ERROR) + self.session.open( MessageBox, _("USB test error : Success-%d"%result+" Fail-%d\nPress 'EXIT' button!"%(len(devices)-result)), MessageBox.TYPE_ERROR) self.rlist[self["testlist"].getCurrent()[1]]="fail" else: self.usbtimer.start(1100,True) @@ -1713,7 +1713,105 @@ class FrontTest_solo(Screen): eSctest.getInstance().turnoff_VFD() self.fronttimer.start(1000,True) +class FrontTest_uno(Screen): + skin = """ + + + """ + + def __init__(self, session): + self["actions"] = ActionMap(["DirectionActions", "OkCancelActions","GlobalActions"], + { + "ok": self.keyOk, + "cancel": self.keyCancel, + "left": self.keyleft, + "right": self.keyright, + "volumeUp": self.keyvolup, + "volumeDown": self.keyvoldown, + "power_down": self.keypower, + }, -2) + + Screen.__init__(self, session) + self["text"]=Label(("Press Front CH -")) + self.step = 1 + self.fronttimer= eTimer() + self.fronttimer.callback.append(self.FrontAnimate) + self.frontturnonoff = 0 + eSctest.getInstance().VFD_Open() + self.keytimeout = eTimer() + self.keytimeout.callback.append(self.KeyTimeOut) + self.keytimeout.start(5000,True) + + def KeyTimeOut(self): + if self.step == 1: + self["text"].setText(("Front CH - ERROR\nPress exit!")) + elif self.step == 2: + self["text"].setText(("Front CH + ERROR\nPress exit!")) + elif self.step == 3 : + self["text"].setText(("Front VOL - ERROR\nPress exit!")) + elif self.step == 4: + self["text"].setText(("Front VOL + ERROR\nPress exit!")) + elif self.step == 5: + self["text"].setText(("Front STANDBY ERROR\nPress exit!")) + self.step = 0 + + def keyleft(self): + if self.step== 1: + self.keytimeout.stop() + self.keytimeout.start(5000,True) + self.step = 2 + self["text"].setText(_("Press Front CH +")) + def keyright(self): + if self.step== 2: + self.keytimeout.stop() + self.keytimeout.start(5000,True) + self.step = 3 + self["text"].setText(_("Press Front VOL -")) + + def keyvoldown(self): + if self.step== 3: + self.keytimeout.stop() + self.keytimeout.start(5000,True) + self.step = 4 + self["text"].setText(_("Press Front VOL +")) + + def keyvolup(self): + if self.step== 4: + self.keytimeout.stop() + self.keytimeout.start(5000,True) + self.step = 5 + self["text"].setText(_("Press Front STANDBY")) + + def keypower(self): + if self.step== 5: + self.keytimeout.stop() + self.step = 6 + self.fronttimer.start(1000,True) + self["text"].setText(_("Front LED OK?\n\nyes-ok\nno-exit")) + + def keyCancel(self): + global fronttest + self.fronttimer.stop() + eSctest.getInstance().VFD_Close() + fronttest = 0 + self.close() + def keyOk(self): + global fronttest + self.fronttimer.stop() + eSctest.getInstance().VFD_Close() + if self.step == 6: + fronttest = 1 + self.close() + + def FrontAnimate(self): + if (self.frontturnonoff==0): + eSctest.getInstance().turnon_VFD() + self.frontturnonoff = 1 + else: + self.frontturnonoff = 0 + eSctest.getInstance().turnoff_VFD() + self.fronttimer.start(1000,True) rstest = 0