Fusion des codes pour PAMI et carte de propulsion

This commit is contained in:
Samuel 2026-04-18 14:08:52 +02:00
parent 5f4cacf2d1
commit ff2996f0e6
3 changed files with 18 additions and 0 deletions

View File

@ -1,3 +1,4 @@
#include "config_robot.h"
#include "QEI.h" #include "QEI.h"
#include "Moteurs.h" #include "Moteurs.h"
#include "Asser_Moteurs.h" #include "Asser_Moteurs.h"

16
config_robot.h Normal file
View File

@ -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

1
main.c
View File

@ -3,6 +3,7 @@
* *
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#include "config_robot.h"
#include "pico/stdlib.h" #include "pico/stdlib.h"
#include "pico/multicore.h" #include "pico/multicore.h"
#include "hardware/adc.h" #include "hardware/adc.h"