|
|
|
|
@ -25,6 +25,8 @@ |
|
|
|
|
/* vars */ |
|
|
|
|
static McuLED_Handle_t LED_blue; |
|
|
|
|
static SF_Handle_t splitflap0, splitflap1; |
|
|
|
|
static uint32_t taskParameter1 = 5; |
|
|
|
|
static TaskHandle_t appTaskHandle = NULL; |
|
|
|
|
|
|
|
|
|
/* function declaration */ |
|
|
|
|
void configureSplitflaps(void); |
|
|
|
|
@ -47,9 +49,9 @@ void App_Init(void){ |
|
|
|
|
MultiSplitFlap_AddFlap(splitflap1); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/* Application run */ |
|
|
|
|
void App_Run(void){ |
|
|
|
|
PRINTF("Initializing split flap motors.\n"); |
|
|
|
|
/* App Task */ |
|
|
|
|
static void App_Task(void* pv){ |
|
|
|
|
PRINTF("Initializing split flap motors.\n"); |
|
|
|
|
bool successfulInit0 = SF_MoveMotorToZeroPosition(splitflap0, 12); |
|
|
|
|
PRINTF("Init of motor 0 done. Success = %s\n\n", successfulInit0 ? "true" : "false"); |
|
|
|
|
|
|
|
|
|
@ -95,6 +97,26 @@ void App_Run(void){ |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/* Application run */ |
|
|
|
|
void App_Run(void){ |
|
|
|
|
BaseType_t res; |
|
|
|
|
|
|
|
|
|
res = xTaskCreate( App_Task, |
|
|
|
|
"appTask", |
|
|
|
|
900/sizeof(StackType_t), |
|
|
|
|
&taskParameter1, |
|
|
|
|
tskIDLE_PRIORITY, |
|
|
|
|
&appTaskHandle); |
|
|
|
|
|
|
|
|
|
if(res != pdPASS) // task creation not successful?
|
|
|
|
|
{ // TODO error handling
|
|
|
|
|
PRINTF("Task creation of app task failed"); |
|
|
|
|
for(;;) {} // Endless loop
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
vTaskStartScheduler(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Application de-initialization */ |
|
|
|
|
void App_Deinit(void){ |
|
|
|
|
|