diff --git a/G3_TP1_labyrinth_etu/src/labyrinth.c b/G3_TP1_labyrinth_etu/src/labyrinth.c index 3c614c73a402fe23e4cc1d3e31ca2f5049991e1e..4de45025ad4e508ba27b373fe7fbc7ea354ffc73 100644 --- a/G3_TP1_labyrinth_etu/src/labyrinth.c +++ b/G3_TP1_labyrinth_etu/src/labyrinth.c @@ -126,6 +126,12 @@ int main(void) xTaskCreate(Algo_bots, (signed portCHAR *)"libreball1", configMINIMAL_STACK_SIZE, &ball_param_th[2], tskIDLE_PRIORITY+1, NULL); + xTaskCreate(Algo_bots, (signed portCHAR *)"libreball2", + configMINIMAL_STACK_SIZE, &ball_param_th[3], tskIDLE_PRIORITY+1, + NULL); + xTaskCreate(Algo_bots, (signed portCHAR *)"libreball3", + configMINIMAL_STACK_SIZE, &ball_param_th[4], tskIDLE_PRIORITY+1, + NULL); vTaskStartScheduler(); // launch scheduler LPC_TIM0->TCR = 1; @@ -148,19 +154,19 @@ void Algo_main_ball(void *params){ if(CollisionState & TOUCH_LEFT){ un_ou_moins_un_x = -1; - ball->ball.pos.x += ball->ball.radius/2; + ball->ball.pos.x += ball->ball.radius/3; } if(CollisionState & TOUCH_RIGHT){ un_ou_moins_un_x = -1; - ball->ball.pos.x -= ball->ball.radius/2; + ball->ball.pos.x -= ball->ball.radius/3; } if(CollisionState & TOUCH_UP){ un_ou_moins_un_y = -1; - ball->ball.pos.y += ball->ball.radius/2; + ball->ball.pos.y += ball->ball.radius/3; } if(CollisionState & TOUCH_DOWN){ un_ou_moins_un_y = -1; - ball->ball.pos.y -= ball->ball.radius/2; + ball->ball.pos.y -= ball->ball.radius/3; } }else{ accel_read(&ball_acc);