From 7ad7ea3bdf19e1493fee3b35af4fc92ac320bdf1 Mon Sep 17 00:00:00 2001 From: James Smith Date: Mon, 22 Dec 2025 12:37:03 +0000 Subject: [PATCH] Add debug output for ADS-B JSON polling thread MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- intercept.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/intercept.py b/intercept.py index 01c11a3..d400550 100755 --- a/intercept.py +++ b/intercept.py @@ -12078,6 +12078,7 @@ def parse_adsb_output(process): 'http://localhost:8080/dump1090/data/aircraft.json' ] working_url = None + print("[ADS-B] JSON polling thread started") while process and process.poll() is None: try: @@ -12087,6 +12088,8 @@ def parse_adsb_output(process): try: with urllib.request.urlopen(url, timeout=2) as response: data = json_lib.loads(response.read().decode()) + if not working_url: + print(f"[ADS-B] JSON: Connected to {url}") working_url = url aircraft_list = data.get('aircraft', []) @@ -12117,10 +12120,10 @@ def parse_adsb_output(process): **aircraft }) break - except: - continue + except Exception as url_err: + continue # Try next URL except Exception as e: - pass + print(f"[ADS-B] JSON error: {e}") time.sleep(1) # Start JSON polling thread