增加调试功能,以及yaw补偿
This commit is contained in:
1 parent
267a659242
commit
957c535bda
257 files changed
+239436
-692
No files matched your search
@@ -0,0 +1,33 @@
|
||||
/* =============================================================================
|
||||
* module_test_task.c - 单电机测试主循环(2ms)
|
||||
*
|
||||
* 只做三件事:
|
||||
* 1) module_test_step():读 DT7、算目标/前馈/PID/限幅/保护、正算功率;
|
||||
* 2) module_test_send():按原工程报文格式下发电流帧(只占用被测电机槽位);
|
||||
* 3) 报活给监控任务。
|
||||
*
|
||||
* 控制周期 2ms 与 PID/前馈/功率预算的 dt 假设严格对应,勿单独改周期。
|
||||
* ========================================================================== */
|
||||
#include "app_tasks.h"
|
||||
#include "cmsis_os.h"
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
#include "module_test.h"
|
||||
|
||||
void module_test_task(void const * argument)
|
||||
{
|
||||
TickType_t last_wake = xTaskGetTickCount();
|
||||
|
||||
(void)argument;
|
||||
|
||||
while (!app_ready)
|
||||
osDelay(2);
|
||||
|
||||
for (;;)
|
||||
{
|
||||
module_test_step();
|
||||
module_test_send();
|
||||
monitor_heartbeat(HB_TEST);
|
||||
vTaskDelayUntil(&last_wake, pdMS_TO_TICKS(2));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user