Payload-SDK
Payload-SDK copied to clipboard
Problem in Osal_GetTimeUs
Hi,
I think there is a typo in the function Osal_GetTimeUs in file samples/sample_c/platform/linux/common/osal/osal.c
T_DjiReturnCode Osal_GetTimeUs(uint64_t *us)
{
struct timeval time;
gettimeofday(&time, NULL);
*us = (time.tv_sec * 1000000 + time.tv_usec);
if (s_localTimeUsOffset == 0) {
s_localTimeUsOffset = *us;
} else {
*us = *us - s_localTimeMsOffset;
}
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
Maybe it should be *us = *us - s_localTimeUsOffset.
I notice that #140 also mentioned this.
Agent comment from Leon in Zendesk ticket #120512:
Hello, thank you for your feedback. It seems that it is indeed spelled wrong. We have fed back to the R&D team for confirmation. If there is a result, we will synchronize it with you again. Thank you again for your feedback~!
°°°