AP_Periph: fix build error

This commit is contained in:
bugobliterator 2021-08-11 19:12:41 +05:30 committed by Andrew Tridgell
parent 6bbfe35c73
commit acab1478a2
1 changed files with 1 additions and 1 deletions

View File

@ -1565,7 +1565,7 @@ void AP_Periph_FW::can_battery_update(void)
#if !defined(HAL_PERIPH_BATTERY_SKIP_NAME)
// example model_name: "org.ardupilot.ap_periph SN 123"
char text[UAVCAN_EQUIPMENT_POWER_BATTERYINFO_MODEL_NAME_MAX_LENGTH+1] {};
hal.util->snprintf(text, sizeof(text), "%s %d", AP_PERIPH_BATTERY_MODEL_NAME, serial_number);
hal.util->snprintf(text, sizeof(text), "%s %ld", AP_PERIPH_BATTERY_MODEL_NAME, (long int)serial_number);
pkt.model_name.len = strlen(text);
pkt.model_name.data = (uint8_t *)text;
#endif //defined(HAL_PERIPH_BATTERY_SKIP_NAME)