Skip to content

Commit ca73cfd

Browse files
committed
fix update rate
1 parent b726bfa commit ca73cfd

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/frontend/components/TrackMap/TrackCanvas.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ export interface TrackDrawing {
3535
// currently its a bit messy with the turns, so we disable them for now
3636
const ENABLE_TURNS = false;
3737

38-
// Optimized update intervals - reduce from 2fps to 10fps for smoother updates
39-
const POSITION_UPDATE_INTERVAL = 100; // 10fps instead of 2fps
38+
const POSITION_UPDATE_INTERVAL = 100;
4039
const RENDER_THROTTLE_MS = 16; // ~60fps for rendering
4140

4241
const TRACK_DRAWING_WIDTH = 1920;

src/frontend/components/TrackMap/hooks/useDriverProgress.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export const useDriverProgress = () => {
1313
const drivers = useSessionDrivers();
1414
const driversLapDist = useTelemetryValuesMapped<number[]>(
1515
'CarIdxLapDistPct',
16-
(val) => Math.round(val * 100) / 100 // Reduce precision to 2 decimal places to minimize unnecessary updates
16+
(val) => Math.round(val * 1000) / 1000 // Reduce precision to 2 decimal places to minimize unnecessary updates
1717
);
1818

1919
// Throttled state to reduce update frequency

0 commit comments

Comments
 (0)