Skip to content

Conversation

@tariknz
Copy link
Owner

@tariknz tariknz commented Jun 27, 2025

Closes #39

Copilot AI review requested due to automatic review settings June 27, 2025 10:30
@tariknz tariknz enabled auto-merge (squash) June 27, 2025 10:30
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR ensures the wind arrow always rotates along the shortest path, adds a metric/imperial toggle for wind speed, and tweaks container sizing in standings components.

  • Implemented angle normalization in WindDirection to animate via the minimal rotation delta
  • Added a metric prop (km/h vs mph) controlled by telemetry and updated speed formatting
  • Removed full-height styling from Standings and Relative components

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
src/frontend/components/Weather/WindDirection/WindDirection.tsx Added state/effect to normalize angle, metric toggle
src/frontend/components/Weather/Weather.tsx Pulled telemetry value and passed metric to WindDirection
src/frontend/components/Standings/Standings.tsx Removed h-full class from container
src/frontend/components/Standings/Relative.tsx Removed h-full class from container
Comments suppressed due to low confidence (1)

src/frontend/components/Weather/WindDirection/WindDirection.tsx:31

  • Add unit tests covering angle normalization logic, especially around the ±π boundaries, to ensure the shortest-path calculation behaves correctly in all edge cases.
    let diff = currentAngle - prevAngle;

@tariknz tariknz merged commit 65f733f into main Jun 27, 2025
1 check passed
@tariknz tariknz deleted the fix/wind-dir branch June 27, 2025 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Weather] Wind direction bug

2 participants