2018-02-16 15:44:45 +01:00
|
|
|
#include <pthread.h>
|
2018-04-30 16:15:47 +02:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <time.h> // random seed
|
2018-02-16 15:44:45 +01:00
|
|
|
#include <unistd.h> // sleep
|
2018-04-30 16:15:47 +02:00
|
|
|
#include <wiringPi.h>
|
2018-02-07 17:57:01 +01:00
|
|
|
|
2018-04-04 16:17:13 +02:00
|
|
|
#include "CF.h"
|
2018-04-30 16:15:47 +02:00
|
|
|
#include "debug.h"
|
|
|
|
#include "ihm.h"
|
2018-02-16 15:44:45 +01:00
|
|
|
#include "movement.h"
|
2018-04-04 16:17:13 +02:00
|
|
|
#include "position.h"
|
2018-02-12 19:23:24 +01:00
|
|
|
|
|
|
|
int main()
|
|
|
|
{
|
2018-02-16 15:44:45 +01:00
|
|
|
|
|
|
|
printf("Démarrage...\n");
|
2018-04-30 16:15:47 +02:00
|
|
|
if (wiringPiSetup() < 0) {
|
|
|
|
fprintf(stderr, "Impossible d'initialiser WiringPi\n");
|
|
|
|
exit(EXIT_FAILURE);
|
|
|
|
}
|
|
|
|
initI2C();
|
|
|
|
configureIHM();
|
|
|
|
|
|
|
|
srand(time(NULL));
|
2018-02-16 15:44:45 +01:00
|
|
|
configureDebug();
|
2018-05-01 08:45:02 +02:00
|
|
|
configureCF();
|
|
|
|
configureMovement();
|
|
|
|
configurePosition();
|
2018-04-29 09:38:49 +02:00
|
|
|
startDebug();
|
2018-02-16 15:44:45 +01:00
|
|
|
|
2018-04-30 16:15:47 +02:00
|
|
|
startIHM();
|
2018-02-16 22:13:24 +01:00
|
|
|
|
2018-05-01 08:45:02 +02:00
|
|
|
deconfigureMovement();
|
|
|
|
deconfigurePosition();
|
|
|
|
deconfigureCF();
|
2018-04-30 16:15:47 +02:00
|
|
|
deconfigureIHM();
|
2018-04-29 09:38:49 +02:00
|
|
|
deconfigureDebug();
|
2018-02-16 15:44:45 +01:00
|
|
|
return EXIT_SUCCESS;
|
2018-02-07 17:57:01 +01:00
|
|
|
}
|