Example #1
0
    def __init__(self, mao):
        ModuleBase.__init__(self)

        self.speachproc = None
        self.speachbuffer = []

        mao.Network.register_function(self.say, "speach")
Example #2
0
    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")
Example #3
0
    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()
Example #4
0
    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
Example #5
0
 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])
Example #6
0
 def __init__(self, obj):
     ModuleBase.__init__(self)
Example #7
0
    def __init__(self, mao):
        ModuleBase.__init__(self)

        self.starttime = time.time()
        mao.Network.register_function(self.gettime,"uptime")
Example #8
0
 def __init__(self, obj):
     ModuleBase.__init__(self)
     self.setTemp = 20
     self.lastRunTime = 0