Harden BT Locate handoff matching and start flow

This commit is contained in:
Smittix
2026-02-20 18:57:06 +00:00
parent e386016349
commit 167f10c7f7
3 changed files with 255 additions and 113 deletions
+11 -10
View File
@@ -143,17 +143,18 @@ def stop_session():
return jsonify({'status': 'stopped'})
@bt_locate_bp.route('/status', methods=['GET'])
def get_status():
"""Get locate session status."""
session = get_locate_session()
if not session:
@bt_locate_bp.route('/status', methods=['GET'])
def get_status():
"""Get locate session status."""
session = get_locate_session()
if not session:
return jsonify({
'active': False,
'target': None,
})
return jsonify(session.get_status())
'active': False,
'target': None,
})
include_debug = str(request.args.get('debug', '')).lower() in ('1', 'true', 'yes')
return jsonify(session.get_status(include_debug=include_debug))
@bt_locate_bp.route('/trail', methods=['GET'])