diff --git a/Asser_Moteurs.c b/Asser_Moteurs.c index 4c13558..59263a5 100644 --- a/Asser_Moteurs.c +++ b/Asser_Moteurs.c @@ -1,3 +1,4 @@ +#include "config_robot.h" #include "QEI.h" #include "Moteurs.h" #include "Asser_Moteurs.h" diff --git a/config_robot.h b/config_robot.h new file mode 100644 index 0000000..9c7a436 --- /dev/null +++ b/config_robot.h @@ -0,0 +1,16 @@ +// Changer le define en fonction qu'on soit sur les PAMIs ou sur le robot principal + +#define ROBOT_PROPULSION_2026 +//#define ROBOT_TYPE_PAMI + +#ifndef ROBOT_PROPULSION_2026 +#ifndef ROBOT_TYPE_PAMI +#error "Vous devez choisir un type de robot" +#endif +#endif + +#ifdef ROBOT_PROPULSION_2026 +#ifdef ROBOT_TYPE_PAMI +#error "Vous devez choisir un seul type de robot" +#endif +#endif diff --git a/main.c b/main.c index 4de4ba4..236167d 100644 --- a/main.c +++ b/main.c @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: BSD-3-Clause */ +#include "config_robot.h" #include "pico/stdlib.h" #include "pico/multicore.h" #include "hardware/adc.h"