feat(drone): add Flask blueprint, register routes, wire drone_queue

Implements Task 5: creates routes/drone.py with /status, /contacts,
/start, /stop, and /stream (SSE fanout) endpoints; registers the
drone_bp blueprint in routes/__init__.py; adds drone_queue to app.py;
adds opendroneid>=1.0 to requirements.txt. All 39 drone tests pass.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
James Smith
2026-05-03 17:37:02 +01:00
parent 39a9fe57bd
commit d00eecf674
5 changed files with 170 additions and 1 deletions
+4 -1
View File
@@ -18,6 +18,7 @@ def register_blueprints(app):
from .bt_locate import bt_locate_bp
from .controller import controller_bp
from .correlation import correlation_bp
from .drone import drone_bp
from .dsc import dsc_bp
from .gps import gps_bp
from .ground_station import ground_station_bp
@@ -91,6 +92,7 @@ def register_blueprints(app):
app.register_blueprint(system_bp) # System health monitoring
app.register_blueprint(ook_bp) # Generic OOK signal decoder
app.register_blueprint(ground_station_bp) # Ground station automation
app.register_blueprint(drone_bp) # Drone intelligence / UAV detection
# Exempt all API blueprints from CSRF (they use JSON, not form tokens)
if _csrf:
@@ -99,5 +101,6 @@ def register_blueprints(app):
# Initialize TSCM state with queue and lock from app
import app as app_module
if hasattr(app_module, 'tscm_queue') and hasattr(app_module, 'tscm_lock'):
if hasattr(app_module, "tscm_queue") and hasattr(app_module, "tscm_lock"):
init_tscm_state(app_module.tscm_queue, app_module.tscm_lock)