[ScanSetup] Send 5v enable option to DVB-T2 blindscan binary.
authorhschang <chang@dev3>
Thu, 23 Feb 2017 08:14:57 +0000 (17:14 +0900)
committerhschang <chang@dev3>
Thu, 23 Feb 2017 08:53:37 +0000 (17:53 +0900)
lib/python/Screens/ScanSetup.py

index 079bdef..bacc7a3 100644 (file)
@@ -129,6 +129,10 @@ def GetDeviceId(filter, nim_idx):
                socket_id += 1
        return device_id
 
+def GetTerrestrial5VEnable(nim_idx):
+       nim = nimmanager.nim_slots[nim_idx]
+       return int(nim.config.terrestrial_5V.value)
+
 class CableTransponderSearchSupport:
 #      def setCableTransponderSearchResult(self, tlist):
 #              pass
@@ -478,6 +482,9 @@ class TerrestrialTransponderSearchSupport:
 #                      print "ERROR: could not get I2C device for nim", nim_idx, "for terrestrial transponder search"
                        self.terrestrial_search_bus = 2
 
+               self.terrestrial_search_feid = nim_idx
+               self.terrestrial_search_enable_5v = GetTerrestrial5VEnable(nim_idx)
+
                self.terrestrial_search_list = []
                self.terrestrialTransponderInitSearchList(self.terrestrial_search_list ,region)
                (freq, bandWidth) = self.terrestrialTransponderGetOpt()
@@ -489,7 +496,9 @@ class TerrestrialTransponderSearchSupport:
 
        def terrestrialTransponderSearch(self, freq, bandWidth):
                self.terrestrial_search_data = ""
-               cmd = "%s --freq %d --bw %d --bus %d --ds 2" % (self.terrestrial_search_binName, freq, bandWidth, self.terrestrial_search_bus)  
+               cmd = "%s --freq %d --bw %d --bus %d --ds 2" % (self.terrestrial_search_binName, freq, bandWidth, self.terrestrial_search_bus)
+               if self.terrestrial_search_enable_5v:
+                       cmd += " --feid %d --5v %d" % (self.terrestrial_search_feid, self.terrestrial_search_enable_5v)
                print "SCAN CMD : ",cmd
                self.terrestrial_search_container.execute(cmd)