Start the orchestrator thread.
(self)
| 135 | wifi_connected = self.wifi_manager.check_wifi_connection() |
| 136 | logger.debug(f"WiFi connection check: {wifi_connected}") |
| 137 | |
| 138 | if wifi_connected: |
| 139 | self.shared_data.wifi_connected = True |
| 140 | if self.orchestrator_thread is None or not self.orchestrator_thread.is_alive(): |
| 141 | logger.info("WiFi detected - attempting to start Orchestrator...") |
| 142 | self.start_orchestrator() |
| 143 | else: |
| 144 | self.shared_data.wifi_connected = False |
| 145 | if not self.wifi_manager.startup_complete: |
| 146 | logger.info("Waiting for Wi-Fi management system to complete startup...") |
| 147 | else: |
| 148 | logger.debug("Waiting for Wi-Fi connection to start Orchestrator...") |
| 149 | |
| 150 | def start_orchestrator(self): |
| 151 | """Start the orchestrator thread.""" |
| 152 | # Always clear manual mode so the main loop will auto-start |
| 153 | # the orchestrator when Wi-Fi becomes available |
| 154 | self.shared_data.manual_mode = False |
| 155 | self.shared_data.orchestrator_should_exit = False |
| 156 | |
| 157 | # Use Wi-Fi manager's connection check |
| 158 | if self.wifi_manager.check_wifi_connection(): |
| 159 | self.shared_data.wifi_connected = True |
no test coverage detected