Initialize the GPIO controller application
()
| 729 | |
| 730 | # Initialize application |
| 731 | def init_app(): |
| 732 | """Initialize the GPIO controller application""" |
| 733 | global monitor_thread, monitor_running |
| 734 | |
| 735 | # Start input monitor thread |
| 736 | monitor_running = True |
| 737 | monitor_thread = threading.Thread(target=input_monitor_worker, daemon=True) |
| 738 | monitor_thread.start() |
| 739 | |
| 740 | log_event(f"GPIO Controller started (Backend: {GPIO_BACKEND}, Pi: {IS_PI})", 'info') |
| 741 | |
| 742 | # Cleanup on exit |
| 743 | atexit.register(cleanup_all) |