示例#1
0
class Module:
    def __init__(self):
        self.comm = Comm()

    def process(self):
        self.comm.send(FrameType.BUTTON_STATE, (1, 2, 3))

        while self.comm.has_data():
            print(self.comm.get_data())
            print()
示例#2
0
def main():
    module = CLIController(Comm(), ["modules/swarm_ui/module/commands.json"])

    while not should_stop and not module.stopped:
        module.process()
        sleep(0.05)

    module.stop()
示例#3
0
def main():
    """symbolic main"""
    print("Starting application...\n")
    module = Module(Comm())
    print("Module created...")
    register_signal_callback(module.stop)
    with module:
        while not module.stopped:
            module.process()
            sleep(0.05)
示例#4
0
文件: main.py 项目: R2D2-2019/vision
def main():

    print("Starting application...\n")
    module = Module(Comm())
    print("Module created...")

    while not SHOULD_STOP:
        module.process()
        sleep(0.05)

    module.stop()
示例#5
0
def main():
    "entry point of the application"

    print("Starting application...\n")
    module = Module(Comm())
    register_signal_callback(module.stop)
    print("Module created...")
    with module:
        while not module.stopped:
            module.process()
            time.sleep(0.05)
示例#6
0
def main():
    """
    Main function that starts the module

    :return:
    """
    print("Starting application...\n")
    module = Module(Comm(), TestButton())
    print("Module created...")

    register_signal_callback(module.stop)

    with module:
        while not module.stopped:
            module.process()
            sleep(0.05)
示例#7
0
 def __init__(self):
     self.comm = Comm()