def __init__(self, mao): ModuleBase.__init__(self) self.speachproc = None self.speachbuffer = [] mao.Network.register_function(self.say, "speach")
def __init__(self, obj): ModuleBase.__init__(self) self.active = False self.obj = obj obj.Network.register_function(self.getAlarmActiveStatus, "getAlarmActiveStatus") obj.Network.register_function(self.setAlarmStatus, "setAlarmStatus") obj.Network.register_function(self.checkAlarmPasscode, "checkAlarmPasscode")
def __init__(self, mao): ModuleBase.__init__(self) self.mao = mao return mao.Network.register_function(self.startAll, "startMotion") mao.Network.register_function(self.stopAll, "stopMotion") self.proc = self.startProcess() self.stopAll()
def __init__(self, mao): ModuleBase.__init__(self) self.buffer = "" self.regexp = re.compile('([\w\d]+)\(([\w\d,"]*)\)') try: portname = mao.Config.getValue("serialcontrolport") self.port = serial.Serial(portname, 9600, EIGHTBITS, PARITY_NONE, STOPBITS_ONE, 0) except: mao.Log.Warning("Failed to open serial port for serial control") self.port = None
def __init__(self, mao): ModuleBase.__init__(self) mao.Network.register_function(self.printer, "printer") mao.Network.register_function(self.hi, "hi") mao.HAL.register_event("StairLight", self.testregister, ["a","b",1])
def __init__(self, obj): ModuleBase.__init__(self)
def __init__(self, mao): ModuleBase.__init__(self) self.starttime = time.time() mao.Network.register_function(self.gettime,"uptime")
def __init__(self, obj): ModuleBase.__init__(self) self.setTemp = 20 self.lastRunTime = 0