support for resume on multiple devices, fix camera freeze bug when opening setup overlay
All checks were successful
pedestrian-simulator / build (push) Successful in 1m19s

This commit is contained in:
2026-01-18 09:55:53 -07:00
parent 16c6c9c074
commit aebd0f21a3
2 changed files with 110 additions and 9 deletions

View File

@@ -360,10 +360,26 @@ func (sm *StepManager) GetStatus() map[string]interface{} {
go sm.Sync() // Async sync
}
return map[string]interface{}{
res := map[string]interface{}{
"tripSteps": currentSmoothed,
"nextSyncTime": nextSyncMilli,
}
sm.mu.Lock()
if sm.tripState.StartDate != "" {
res["activeTrip"] = map[string]interface{}{
"trip_type": sm.tripState.TripType,
"route_name": sm.tripState.RouteName,
"start_address": sm.tripState.StartAddress,
"end_address": sm.tripState.EndAddress,
"kml_id": sm.tripState.KmlID,
"total_distance": sm.tripState.TotalDistance,
"start_time": sm.tripState.StartTime,
}
}
sm.mu.Unlock()
return res
}
// RecalculateTotalFromState sums up the steps from the DailyCache without making external API calls