Esempio n. 1
0
    def run_auto(self):
        """ Runs in full auto mode. """
        self.configure_devices()

        # create controller
        kernel = FishPiKernel(self.config, debug=self.debug)

        # testing
        kernel.list_devices()

        # run scripts
        logging.info("FISHPI:\tRunning autonomous scripts...")
        pass
        logging.info("FISHPI:\tNo autonomous scripts implemented - exiting.")
        # done
        return 0
    def run_auto(self):
        """ Runs in full auto mode. """
        self.configure_devices()
        
        # create controller
        kernel = FishPiKernel(self.config, debug=self.debug)
        
        # testing
        kernel.list_devices()

        # run scripts
        logging.info("FISHPI:\tRunning autonomous scripts...")
        pass
        logging.info("FISHPI:\tNo autonomous scripts implemented - exiting.")
        # done
        return 0
    def run_headless(self):
        """ Runs in headless (manual) mode. """
        # configure
        self.configure_devices()

        # create controller
        kernel = FishPiKernel(self.config, debug=self.debug)

        # testing
        kernel.list_devices()

        # wait for commands...
        logging.info("FISHPI:\tWaiting for commands...")

        # run internal webhost
        import web.webhost
        web.webhost.run_main_host(kernel, self.rpc_port)
        logging.info("FISHPI:\tProgram complete - exiting.")
        
        # done
        return 0
Esempio n. 4
0
    def run_headless(self):
        """ Runs in headless (manual) mode. """
        # configure
        if self.configure_devices() is False:
            return 1  # if config failed, exit..

        # create controller
        kernel = FishPiKernel(self.config, debug=self.debug)

        # testing
        kernel.list_devices()

        # wait for commands...
        logging.info("FISHPI:\tWaiting for commands...")

        # run internal webhost
        import web.webhost
        web.webhost.run_main_host(kernel, self.config.rpc_port)
        logging.info("FISHPI:\tProgram complete - exiting.")

        # done
        return 0
Esempio n. 5
0
    def run_ui(self):
        """ Runs in UI mode. """
        if self.selected_mode == FishPiRunMode.Local:
            # configure
            self.configure_devices()

            # create controller
            kernel = FishPiKernel(self.config, debug=self.debug)

            # run ui loop
            logging.info("FISHPI:\tLaunching UI...")
            ui.controller.run_main_view_tk(kernel)
            logging.info("FISHPI:\tProgram complete - exiting.")
        else:
            # run ui loop
            logging.info("FISHPI:\tLaunching UI...")
            ui.controller.run_main_view_wx(self.config)
            logging.info("FISHPI:\tProgram complete - exiting.")
        # done
        return 0