M350b版本
This commit is contained in:
@ -75,6 +75,9 @@ T_DjiReturnCode Osal_TaskCreate(const char *name, void *(*taskFunc)(void *), uin
|
||||
|
||||
T_DjiReturnCode Osal_TaskDestroy(T_DjiTaskHandle task)
|
||||
{
|
||||
if (task == NULL) {
|
||||
return DJI_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
|
||||
}
|
||||
pthread_cancel(*(pthread_t *) task);
|
||||
free(task);
|
||||
|
||||
@ -320,7 +323,7 @@ T_DjiReturnCode Osal_GetTimeUs(uint64_t *us)
|
||||
if (s_localTimeUsOffset == 0) {
|
||||
s_localTimeUsOffset = *us;
|
||||
} else {
|
||||
*us = *us - s_localTimeMsOffset;
|
||||
*us = *us - s_localTimeUsOffset;
|
||||
}
|
||||
|
||||
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
|
||||
@ -344,4 +347,4 @@ void Osal_Free(void *ptr)
|
||||
free(ptr);
|
||||
}
|
||||
|
||||
/****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/
|
||||
/****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/
|
||||
|
||||
Reference in New Issue
Block a user