[logging] fix print format when enabling csl debug (#8667)

Fix some `uint32_t` variables using `%u` format when enabling csl debug.
This commit is contained in:
Zhangwx
2023-01-18 11:28:17 -08:00
committed by GitHub
parent fe1cf3a294
commit 62cfa5144a
+4 -3
View File
@@ -299,9 +299,10 @@ void SubMac::HandleReceiveDone(RxFrame *aFrame, Error aError)
#if OPENTHREAD_CONFIG_MAC_CSL_DEBUG_ENABLE
// Split the log into two lines for RTT to output
LogDebg("Received frame in state (SubMac %s, CSL %s), timestamp %u", StateToString(mState),
mIsCslSampling ? "CslSample" : "CslSleep", static_cast<uint32_t>(aFrame->mInfo.mRxInfo.mTimestamp));
LogDebg("Target sample start time %u, time drift %d", mCslSampleTime.GetValue(),
LogDebg("Received frame in state (SubMac %s, CSL %s), timestamp %lu", StateToString(mState),
mIsCslSampling ? "CslSample" : "CslSleep",
ToUlong(static_cast<uint32_t>(aFrame->mInfo.mRxInfo.mTimestamp)));
LogDebg("Target sample start time %lu, time drift %d", ToUlong(mCslSampleTime.GetValue()),
static_cast<uint32_t>(aFrame->mInfo.mRxInfo.mTimestamp) - mCslSampleTime.GetValue());
#endif
}