mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-16 21:33:33 +08:00
fix sign compare to make travis-ci happy
This commit is contained in:
@@ -605,8 +605,8 @@ protected:
|
||||
bat_msg.battery_function = MAV_BATTERY_FUNCTION_ALL;
|
||||
bat_msg.type = MAV_BATTERY_TYPE_LIPO;
|
||||
bat_msg.temperature = INT16_MAX;
|
||||
for (unsigned i = 0; i < (sizeof(bat_msg.voltages) / sizeof(bat_msg.voltages[0])); i++) {
|
||||
if (i < battery_status.cell_count) {
|
||||
for (unsigned int i = 0; i < (sizeof(bat_msg.voltages) / sizeof(bat_msg.voltages[0])); i++) {
|
||||
if ((int)i < battery_status.cell_count) {
|
||||
bat_msg.voltages[i] = (battery_status.voltage_v / battery_status.cell_count) * 1000.0f;
|
||||
} else {
|
||||
bat_msg.voltages[i] = UINT16_MAX;
|
||||
|
||||
Reference in New Issue
Block a user