mirror of
https://github.com/pyMC-dev/pyMC_Repeater.git
synced 2026-08-09 18:33:14 +02:00
chore: move GPS diagnostics UI to frontend repo
This commit is contained in:
+2
-2
@@ -127,13 +127,13 @@ repeater:
|
||||
jwt_expiry_minutes: 60
|
||||
|
||||
# Local GPS diagnostics. When enabled, the daemon reads NMEA sentences from the
|
||||
# configured source and exposes parsed attributes at /api/gps and /gps.
|
||||
# configured source and exposes parsed attributes at /api/gps.
|
||||
gps:
|
||||
enabled: false
|
||||
|
||||
# Use repeater.latitude/repeater.longitude as the displayed receiver location
|
||||
# until the GPS has a valid non-stale fix. This prevents early no-fix GPS
|
||||
# estimates from moving the diagnostics globe/map away from the configured site.
|
||||
# estimates from replacing the configured site location in API clients.
|
||||
# The default 0,0 repeater location is treated as unset.
|
||||
use_manual_location_until_fix: true
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ GPS/NMEA acquisition and diagnostics support.
|
||||
The service intentionally keeps the NMEA parser local and dependency-light. It
|
||||
accepts raw NMEA sentences from a serial receiver or from a file source used by
|
||||
external bridge processes, then exposes a JSON-serializable snapshot for the
|
||||
HTTP API and diagnostics UI.
|
||||
HTTP API.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -152,19 +152,6 @@ class StatsApp:
|
||||
logger.error(f"Error serving index.html: {e}")
|
||||
raise cherrypy.HTTPError(500, "Internal server error")
|
||||
|
||||
@cherrypy.expose
|
||||
def gps(self, **kwargs):
|
||||
"""Serve the standalone GPS diagnostics page."""
|
||||
gps_path = os.path.join(self.html_dir, "gps.html")
|
||||
try:
|
||||
with open(gps_path, "r", encoding="utf-8") as f:
|
||||
return f.read()
|
||||
except FileNotFoundError:
|
||||
raise cherrypy.HTTPError(404, "GPS diagnostics page not found.")
|
||||
except Exception as e:
|
||||
logger.error(f"Error serving gps.html: {e}")
|
||||
raise cherrypy.HTTPError(500, "Internal server error")
|
||||
|
||||
@cherrypy.expose
|
||||
def default(self, *args, **kwargs):
|
||||
"""Handle client-side routing - serve index.html for all non-API routes."""
|
||||
|
||||
@@ -351,7 +351,7 @@ paths:
|
||||
type: object
|
||||
position:
|
||||
type: object
|
||||
description: Effective receiver position used by the diagnostics UI
|
||||
description: Effective receiver position for API clients
|
||||
gps_position:
|
||||
type: object
|
||||
description: Raw position reported by the GPS receiver, even before a valid fix
|
||||
|
||||
Reference in New Issue
Block a user