uavcannode: fix compile error in BatteryInfo.hpp (#25944)

This commit is contained in:
Alexander Lerach 2025-11-19 10:23:25 -05:00 committed by GitHub
parent e0137fe7a7
commit 229b53d25d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -86,7 +86,7 @@ public:
battery_info_aux.timestamp.usec = battery.timestamp;
for (uint8_t i = 0; i < battery.cell_count && i < battery.voltage_cell_v.size(); i++) {
for (uint8_t i = 0; i < battery.cell_count && i < arraySize(battery_status_s::voltage_cell_v); i++) {
battery_info_aux.voltage_cell.push_back(battery.voltage_cell_v[i]);
}