mirror of
https://github.com/RobotechLille/cdf2018-principal
synced 2025-09-04 01:05:56 +02:00
Travail inachevé avec Arduino
This commit is contained in:
parent
5c1ccbce93
commit
af080ac4bf
9 changed files with 84 additions and 25 deletions
1
chef/src/AFsignals.h
Symbolic link
1
chef/src/AFsignals.h
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../arduino/AFsignals.h
|
|
@ -21,14 +21,20 @@ void* TaskDebug(void* pdata)
|
|||
|
||||
void printDebugInfos(struct A2CI_DBGs* debug)
|
||||
{
|
||||
printf("← Position actuelle (%f; %f) (%f°)", debug->actuel.x, debug->actuel.y, debug->actuel.o);
|
||||
printf(", destination : ");
|
||||
// Position
|
||||
printf("← + % .6g; % .6g % .6g°", debug->actuel.x, debug->actuel.y, debug->actuel.o);
|
||||
// Frequence de calcul de la position
|
||||
printf(" % 5d☼", debug->nbCalcPos);
|
||||
// Delta codeuses
|
||||
printf(", %5d↿↾%-5d", debug->deltaCoder.dL, debug->deltaCoder.dR);
|
||||
// Destination
|
||||
printf(", ");
|
||||
if (debug->movement == C2AD_BRAKE) {
|
||||
printf("ne pas bouger\n");
|
||||
printf("⇞ \n");
|
||||
} else if (debug->movement == C2AD_FREE) {
|
||||
printf("là où le vent l'emporte\n");
|
||||
printf("↕ \n");
|
||||
} else {
|
||||
printf("(%f; %f) (%f°)\n", debug->destination.x, debug->destination.y, debug->destination.o);
|
||||
printf("↑ % .6g; % .6g % .6g°\n", debug->destination.x, debug->destination.y, debug->destination.o);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include "movement.h"
|
||||
#include "debug.h"
|
||||
|
||||
#define TEMPSMAX 10
|
||||
#define TEMPSMAX 60
|
||||
|
||||
void* TaskParcours(void *pdata)
|
||||
{
|
||||
|
@ -42,8 +42,8 @@ int main()
|
|||
/* printf("En attente de la tirette...\n"); // TODO */
|
||||
printf("C'est parti !\n");
|
||||
|
||||
pthread_t tParcours;
|
||||
pthread_create(&tParcours, NULL, TaskParcours, NULL);
|
||||
/* pthread_t tParcours; */
|
||||
/* pthread_create(&tParcours, NULL, TaskParcours, NULL); */
|
||||
|
||||
sleep(TEMPSMAX);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue