fix: migrate CMSIS-RTOS v1 to v2 API, fix stack overflow and float format crash
- Replace osThreadDef/osThreadCreate/osThread with osThreadNew/osThreadAttr_t - Replace osSignalWait with osThreadFlagsWait - Change osThreadId to osThreadId_t, osPriority to osPriority_t - Increase daemon task stack from 128 to 512 to fix stack overflow HardFault - Cast BMI088.Temperature float to int before %d format to fix va_list misalignment
This commit is contained in:
@@ -176,10 +176,15 @@ void INS_Task(void)
|
||||
IMU_Temperature_Ctrl();
|
||||
}
|
||||
|
||||
if ((count++ % 1000) == 0)
|
||||
if ((count % 1000) == 0)
|
||||
{
|
||||
// 1Hz 可以加入monitor函数,检查IMU是否正常运行/离线
|
||||
LOGINFO("[IMU] Temperature: %d C, PWM: %d", (int)(BMI088.Temperature * 100), (int)TempCtrl.Output);
|
||||
}
|
||||
|
||||
count++;
|
||||
if (count >= 10000)
|
||||
count = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user