gps: debug stub mode with satellites field and signal loss simulation

- _GPS_DEBUG flag for development without hardware
- stub mode: realistic mock data with occasional signal loss
- satellites field in backend and UI data models
- periodic status logging

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Mikkeli Matlock
2026-02-08 03:04:44 +09:00
parent 9173c3b93a
commit 896ba322c0
3 changed files with 147 additions and 20 deletions

View File

@@ -108,8 +108,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
setState(() {
_gpsSpeed = data.speed;
_gpsTrack = data.track;
// Derive satellites from mode (placeholder logic)
_gpsSatellites = data.mode == 3 ? 8 : (data.mode == 2 ? 4 : 0);
_gpsSatellites = data.satellites;
});
});
@@ -144,7 +143,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
if (cachedGps != null) {
_gpsSpeed = cachedGps.speed;
_gpsTrack = cachedGps.track;
_gpsSatellites = cachedGps.mode == 3 ? 8 : (cachedGps.mode == 2 ? 4 : 0);
_gpsSatellites = cachedGps.satellites;
}
_wsState = WebSocketService.instance.connectionState;