Skip to content

fix: only transmit 0x040 SAIL_WIND on MWV sentences, not XDR#51

Open
georgesleen wants to merge 1 commit into
wingsail-working-branchfrom
fix/wind-double-can-transmit
Open

fix: only transmit 0x040 SAIL_WIND on MWV sentences, not XDR#51
georgesleen wants to merge 1 commit into
wingsail-working-branchfrom
fix/wind-double-can-transmit

Conversation

@georgesleen

@georgesleen georgesleen commented Apr 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • The CV7 wind sensor sends MWV (wind angle/speed) and XDR (temperature) as a back-to-back pair each cycle
  • The scheduler was calling WIND_SENSOR__CAN_transmit for both sentence types, causing 0x040 to be sent twice per cycle
  • The XDR-triggered transmission sent stale wind data, since XDR only updates self->temp — a field not present in 0x040 per the CAN frame spec
  • Fix: guard the CAN_transmit call so it only fires when the parsed sentence was MESSAGE_MWV

The CV7 sends MWV (wind angle/speed) and XDR (temperature) back-to-back
each cycle. The scheduler was calling WIND_SENSOR__CAN_transmit for both,
causing 0x040 to be sent twice per cycle — the XDR-triggered transmission
sent stale wind data since XDR only updates temp, which isn't in 0x040.
@georgesleen
georgesleen changed the base branch from main to wingsail-working-branch April 4, 2026 20:26
@georgesleen

Copy link
Copy Markdown
Contributor Author

Closes #52

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.

1 participant