Skip to content

Conversation

MaEtUgR
Copy link
Member

@MaEtUgR MaEtUgR commented Oct 14, 2025

Solved Problem

When checking the code to write docs for #25756 I found:

  • the timestamp gets saved also when not armed
  • the timeout checks for ESC telemetry timeout and ESC undercurrent hysteresis use subtraction on unsigned timestamps which lead to hard to find wrapping issues before.

Solution

  • Save timestamp only for the scope needed
  • change timeout checks now - hopefully_older_time > timeoutnow > hopefully_older_time + timeout

Changelog Entry

FailureDetector: use robust timeout checks for motor failure detection

Test coverage

No specific testing at the moment. Plaese review for mistakes. This is just a small improvement. I'll more thoroughly test motor failure detection and do more changes but found it was worth to fix now that I see it.

@MaEtUgR MaEtUgR requested a review from dakejahl October 14, 2025 12:00
@MaEtUgR MaEtUgR self-assigned this Oct 14, 2025
@dakejahl dakejahl merged commit babe094 into main Oct 14, 2025
69 of 70 checks passed
@dakejahl dakejahl deleted the maetugr/motor-failure-robust-time-checks branch October 14, 2025 18:46
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.

2 participants