|
|
|
|
@ -73,8 +73,13 @@ void App_Init(void){ |
|
|
|
|
void App_Run(void){ |
|
|
|
|
|
|
|
|
|
PRINTF("Initializing split flap motors.\n"); |
|
|
|
|
SF_MoveMotorToZeroPosition(splitflap0, 2); |
|
|
|
|
PRINTF("Init of motors done.\n\n"); |
|
|
|
|
bool successfulInit = SF_MoveMotorToZeroPosition(splitflap0, 2); |
|
|
|
|
PRINTF("Init of motors done. Success = %s\n\n", successfulInit ? "true" : "false"); |
|
|
|
|
|
|
|
|
|
// if init failed => stop
|
|
|
|
|
if(successfulInit == false){ |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// go through the following letters
|
|
|
|
|
char* letters[] = {"J", "O", "N", "A", "S", "!"}; |
|
|
|
|
@ -88,19 +93,6 @@ void App_Run(void){ |
|
|
|
|
PRINTF("Position after move is is %i\n", (int)SF_GetMotorPosition(splitflap0)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* TEST PATTERN */ |
|
|
|
|
/*while(1) {
|
|
|
|
|
if(SF_GetMagSensorAtZeroPosition(splitflap0)){ |
|
|
|
|
McuLED_On(LED_blue); |
|
|
|
|
} else { |
|
|
|
|
McuLED_Off(LED_blue); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
McuWait_Waitms(10); // wait for 10 ms
|
|
|
|
|
}*/ |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|