From 0143cd5e90dc45ce4a1beaac473139e7a6455152 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Heredero?= Date: Wed, 23 Aug 2023 17:16:39 +0200 Subject: [PATCH] add car CST --- 306-controller_interface.X/app/car.h | 42 +++++++++++++++++++ .../nbproject/configurations.xml | 1 + 2 files changed, 43 insertions(+) create mode 100644 306-controller_interface.X/app/car.h diff --git a/306-controller_interface.X/app/car.h b/306-controller_interface.X/app/car.h new file mode 100644 index 0000000..b3666b3 --- /dev/null +++ b/306-controller_interface.X/app/car.h @@ -0,0 +1,42 @@ +/** + * @author Rémi Heredero + * @version. 0.0.0 + * @date August 2023 + * @file car.h + */ + +#ifndef CAR_H +#define CAR_H + +/************* + * MODULE ID * + *************/ +#define ID_CONTROL 1 // Control the three-wheeler +#define ID_JOYSTICK 2 // Inform control avout current joystick state +#define ID_DISPLAY 3 // User interface to display informations +#define ID_DRIVE 4 // Drive power motor of the three-wheeler +#define ID_STEERING 5 // Drive the direction motor og the three-wheeler +#define ID_SUPPLY 6 // Information about batteries, current, ... +#define ID_BROADCAST 0 // Message to and from any module +#define ID_DEBUG 0 // Message to and from any module + +typedef struct { + uint8_t CONTROL_STEERING_MODE; + uint8_t CONTROL_ALIVE_TIME; + uint32_t CONTROL_SPEED_FACTOR; + uint32_t CONTROL_POWER_FACTOR; + uint32_t CONTROL_STEERING_FACTOR; + uint8_t CONTROL_MAX_SPEED_FW; + uint8_t CONTROL_MAX_SPEED_BW; + uint8_t JOYSTICK_ALIVE_TIME; + uint8_t DISPLAY_ALIVE_TIME; + uint8_t DRIVE_SPEED_TIME; + uint8_t DRIVE_STOP_TIME; + uint8_t DRIVE_ALIVE_TIME; + uint8_t STEERING_ALIVE_TIME; + uint8_t BATTERY_ALIVE_TIME; +} CAR_CST; + + +#endif /* CAR_H */ + diff --git a/306-controller_interface.X/nbproject/configurations.xml b/306-controller_interface.X/nbproject/configurations.xml index 9db35d3..22bcb54 100644 --- a/306-controller_interface.X/nbproject/configurations.xml +++ b/306-controller_interface.X/nbproject/configurations.xml @@ -6,6 +6,7 @@ projectFiles="true"> app/factory/factory.h + app/car.h board/led/led.h