Browse Source

SITL: correct format string in SIM_IntelligentEnergy24

gps-1.3.1
Peter Barker 3 years ago committed by Peter Barker
parent
commit
8c60bfc1c3
  1. 10
      libraries/SITL/SIM_IntelligentEnergy24.cpp

10
libraries/SITL/SIM_IntelligentEnergy24.cpp

@ -116,11 +116,11 @@ void IntelligentEnergy24::update_send()
hal.util->snprintf(message, ARRAY_SIZE(message), "<%i,%.1f,%i,%u,%i,%u,%u>\n", hal.util->snprintf(message, ARRAY_SIZE(message), "<%i,%.1f,%i,%u,%i,%u,%u>\n",
tank_bar, tank_bar,
battery_voltage, battery_voltage,
pwr_out, (signed)pwr_out,
spm_pwr, (unsigned)spm_pwr,
battery_pwr, (signed)battery_pwr,
state, (unsigned)state,
(uint32_t)err_code); (unsigned)err_code);
if ((unsigned)write_to_autopilot(message, strlen(message)) != strlen(message)) { if ((unsigned)write_to_autopilot(message, strlen(message)) != strlen(message)) {
AP_HAL::panic("Failed to write to autopilot: %s", strerror(errno)); AP_HAL::panic("Failed to write to autopilot: %s", strerror(errno));

Loading…
Cancel
Save