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
All checks were successful
pedestrian-simulator / build (push) Successful in 1m19s
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user