uavcan: increase battery filter sample interval to 500ms (#25454)

Fixes issue #25430

Co-authored-by: Lasse Järvelä <lasse.jarvela@iceye.com>
This commit is contained in:
ljarvela 2025-08-22 05:19:52 +03:00 committed by GitHub
parent 138427b3a8
commit b53ecf7f68
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -118,7 +118,7 @@ private:
static constexpr int BATTERY_INDEX_2 = 2;
static constexpr int BATTERY_INDEX_3 = 3;
static constexpr int BATTERY_INDEX_4 = 4;
static constexpr int SAMPLE_INTERVAL_US = 20_ms; // assume higher frequency UAVCAN feedback than 50Hz
static constexpr int SAMPLE_INTERVAL_US = 500_ms; // Typical message rate for a CAN battery monitor should be 2-5Hz.
static_assert(battery_status_s::MAX_INSTANCES <= BATTERY_INDEX_4, "Battery array too big");