예제 #1
0
    def command(self, what, param=0):
        if self.frontend:
            cmd = eDVBDiseqcCommand()
            if what == "moveWest":
                string = 'e03169' + ("%02x" % param)
            elif what == "moveEast":
                string = 'e03168' + ("%02x" % param)
            elif what == "moveTo":
                string = 'e0316b' + ("%02x" % param)
            elif what == "store":
                string = 'e0316a' + ("%02x" % param)
            elif what == "limitOn":
                string = 'e0316a00'
            elif what == "limitOff":
                string = 'e03163'
            elif what == "limitEast":
                string = 'e03166'
            elif what == "limitWest":
                string = 'e03167'
            else:
                string = 'e03160'  #positioner stop

            print "diseqc command:",
            print string
            cmd.setCommandString(string)
            self.frontend.setTone(iDVBFrontend.toneOff)
            sleep(0.015)  # wait 15msec after disable tone
            self.frontend.sendDiseqc(cmd)
            if string == 'e03160':  #positioner stop
                sleep(0.05)
                self.frontend.sendDiseqc(cmd)  # send 2nd time
예제 #2
0
파일: plugin.py 프로젝트: popazerty/12
	def command(self, what, param = 0):
		if self.frontend:
			cmd = eDVBDiseqcCommand()
			if what == "moveWest":
				string = 'e03169' + ("%02x" % param)
			elif what == "moveEast":
				string = 'e03168' + ("%02x" % param)
			elif what == "moveTo":
				string = 'e0316b' + ("%02x" % param)
			elif what == "store":
				string = 'e0316a' + ("%02x" % param)
			elif what == "limitOn":
				string = 'e0316a00'
			elif what == "limitOff":
				string = 'e03163'
			elif what == "limitEast":
				string = 'e03166'
			elif what == "limitWest":
				string = 'e03167'
			else:
				string = 'e03160' #positioner stop

			print "diseqc command:",
			print string
			cmd.setCommandString(string)
			self.frontend.setTone(iDVBFrontend.toneOff)
			sleep(0.015) # wait 15msec after disable tone
			self.frontend.sendDiseqc(cmd)
			if string == 'e03160': #positioner stop
				sleep(0.05)
				self.frontend.sendDiseqc(cmd) # send 2nd time