File tree 1 file changed +10
-2
lines changed
application/custom_controller
1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 23
23
#define __weak __attribute__((weak))
24
24
#endif /* __weak */
25
25
26
+ __weak void CustomControllerPublish (void );
26
27
__weak void CustomControllerInit (void );
27
28
__weak void CustomControllerHandleException (void );
28
29
__weak void CustomControllerSetMode (void );
@@ -38,15 +39,16 @@ __weak void CustomControllerSendCmd(void);
38
39
*/
39
40
void custom_controller_task (void const * pvParameters )
40
41
{
42
+ CustomControllerPublish ();
41
43
vTaskDelay (CUSTOM_CONTROLLER_TASK_INIT_TIME );
42
44
// 初始化
43
45
CustomControllerInit ();
44
46
45
47
while (1 ) {
46
- // 处理异常
47
- CustomControllerHandleException ();
48
48
// 更新状态量
49
49
CustomControllerObserver ();
50
+ // 处理异常
51
+ CustomControllerHandleException ();
50
52
// 设置模式
51
53
CustomControllerSetMode ();
52
54
// 设置目标量
@@ -61,6 +63,12 @@ void custom_controller_task(void const * pvParameters)
61
63
}
62
64
}
63
65
66
+ __weak void CustomControllerPublish (void )
67
+ {
68
+ /*
69
+ NOTE : 在其他文件中定义具体内容
70
+ */
71
+ }
64
72
__weak void CustomControllerInit (void )
65
73
{
66
74
/*
You can’t perform that action at this time.
0 commit comments