AP_InertialSensor: resolve gcs::send_text compiler warning

This commit is contained in:
Randy Mackay 2019-07-27 11:08:05 +09:00
parent f211a0e40c
commit 6a154c4e4c

View File

@ -56,7 +56,7 @@ void AP_InertialSensor::BatchSampler::init()
_required_count -= _required_count % 32; // round down to nearest multiple of 32 _required_count -= _required_count % 32; // round down to nearest multiple of 32
const uint32_t total_allocation = 3*_required_count*sizeof(uint16_t); const uint32_t total_allocation = 3*_required_count*sizeof(uint16_t);
gcs().send_text(MAV_SEVERITY_DEBUG, "INS: alloc %u bytes for ISB (free=%u)", total_allocation, hal.util->available_memory()); gcs().send_text(MAV_SEVERITY_DEBUG, "INS: alloc %u bytes for ISB (free=%u)", (unsigned int)total_allocation, (unsigned int)hal.util->available_memory());
data_x = (int16_t*)calloc(_required_count, sizeof(int16_t)); data_x = (int16_t*)calloc(_required_count, sizeof(int16_t));
data_y = (int16_t*)calloc(_required_count, sizeof(int16_t)); data_y = (int16_t*)calloc(_required_count, sizeof(int16_t));
@ -68,7 +68,7 @@ void AP_InertialSensor::BatchSampler::init()
data_x = nullptr; data_x = nullptr;
data_y = nullptr; data_y = nullptr;
data_z = nullptr; data_z = nullptr;
gcs().send_text(MAV_SEVERITY_WARNING, "Failed to allocate %u bytes for IMU batch sampling", total_allocation); gcs().send_text(MAV_SEVERITY_WARNING, "Failed to allocate %u bytes for IMU batch sampling", (unsigned int)total_allocation);
return; return;
} }