AP_UAVCAN: fixed printf format errors

This commit is contained in:
Andrew Tridgell 2021-08-04 12:44:31 +10:00
parent c4d05b3f3a
commit cb462cac6e
2 changed files with 7 additions and 3 deletions

View File

@ -633,9 +633,13 @@ void AP_UAVCAN_DNA_Server::handleAllocation(uint8_t driver_index, uint8_t node_i
} }
if (rcvd_unique_id_offset) { if (rcvd_unique_id_offset) {
debug_uavcan(AP_CANManager::LOG_DEBUG, "TIME: %ld -- Accepting Followup part! %u\n", uavcan::SystemClock::instance().getMonotonic().toUSec()/1000, (now - last_alloc_msg_ms)); debug_uavcan(AP_CANManager::LOG_DEBUG, "TIME: %ld -- Accepting Followup part! %u\n",
long(uavcan::SystemClock::instance().getMonotonic().toUSec()/1000),
unsigned((now - last_alloc_msg_ms)));
} else { } else {
debug_uavcan(AP_CANManager::LOG_DEBUG, "TIME: %ld -- Accepting First part! %u\n", uavcan::SystemClock::instance().getMonotonic().toUSec()/1000, (now - last_alloc_msg_ms)); debug_uavcan(AP_CANManager::LOG_DEBUG, "TIME: %ld -- Accepting First part! %u\n",
long(uavcan::SystemClock::instance().getMonotonic().toUSec()/1000),
unsigned((now - last_alloc_msg_ms)));
} }
last_alloc_msg_ms = now; last_alloc_msg_ms = now;

View File

@ -166,7 +166,7 @@ bool CanIfaceMgr::add_interface(AP_HAL::CANIface *can_iface)
AP::can().log_text(AP_CANManager::LOG_ERROR, LOG_TAG, "UAVCANIfaceMgr: Setting event handle failed\n"); AP::can().log_text(AP_CANManager::LOG_ERROR, LOG_TAG, "UAVCANIfaceMgr: Setting event handle failed\n");
return false; return false;
} }
AP::can().log_text(AP_CANManager::LOG_INFO, LOG_TAG, "UAVCANIfaceMgr: Successfully added interface %d\n"); AP::can().log_text(AP_CANManager::LOG_INFO, LOG_TAG, "UAVCANIfaceMgr: Successfully added interface %d\n", int(num_ifaces));
num_ifaces++; num_ifaces++;
return true; return true;
} }