Make header structure compatible with simulator

Currently, the generated Makefile doesn't successfully compile. But it
is possible to run the simulator again by manually editing the Makefile.
This commit is contained in:
Jasper Blanckenburg 2023-05-23 02:19:46 +02:00
parent 6543ac4d95
commit 2347b738c5
19 changed files with 255 additions and 204 deletions

View File

@ -1,164 +1,28 @@
#ifndef __INC_VEHICLE_H #ifndef __INC_VEHICLE_H
#define __INC_VEHICLE_H #define __INC_VEHICLE_H
#include "params.h"
#include "stw_defines.h"
#include "tx_port.h"
#include "stm32h7xx_hal.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
typedef enum { #include "params.h"
TS_INACTIVE = 0, #include "stw_defines.h"
TS_ACTIVE = 1,
TS_PRECHARGE = 2,
TS_DISCHARGE = 3,
TS_ERROR = 4,
TS_CHARGING_CHECK = 5,
TS_CHARGING = 6
} TSState;
typedef enum { void vehicle_select_mission(Mission mission);
AS_OFF = 0, void vehicle_broadcast_param(ParamType param, int32_t value);
AS_MANUAL = 1,
AS_READY = 2,
AS_DRIVING = 3,
AS_FINISHED = 4,
AS_EMERGENCY = 5
} ASState;
typedef enum { #ifndef SIMULATOR
R2D_NONE = 0,
R2D_TSMS = 1,
R2D_TSACTIVE = 2,
R2D_RESETTING_NODES = 3,
R2D_RESETTING_COMMS = 4,
R2D_WAITING_INIT = 5,
R2D_INIT_STAGE1 = 6,
R2D_INIT_STAGE2 = 7,
R2D_INIT_SUCCESS = 0xF
} R2DProgress;
typedef enum { #include "tx_port.h"
INICHK_START = 0,
INICHK_WD_CHECK = 1,
INICHK_WD_OK = 2,
INICHK_ASB_CHECK_1 = 3,
INICHK_ASB_CHECK_2 = 4,
INICHK_WAIT_TS = 5,
INICHK_EBS_CHECK_A = 6,
INICHK_EBS_CHECK_B = 7,
INICHK_DONE = 8,
INICHK_ERROR = 9
} IniChkState;
typedef enum { #include "stm32h7xx_hal.h"
AMS_ERROR_NONE = 0x00,
AMS_ERROR_SLAVE_TIMEOUT = 0x01,
AMS_ERROR_SLAVE_PANIC = 0x02,
AMS_ERROR_SHUNT_TIMEOUT = 0x03,
AMS_ERROR_SHUNT_OVERCURRENT = 0x04,
AMS_ERROR_SHUNT_OVERTEMP = 0x05
} AMSErrorKind;
typedef enum {
AMS_SLAVEPANIC_OVERTEMP = 0x00,
AMS_SLAVEPANIC_UNDERTEMP = 0x01,
AMS_SLAVEPANIC_OVERVOLTAGE = 0x02,
AMS_SLAVEPANIC_UNDERVOLTAGE = 0x03,
AMS_SLAVEPANIC_TOO_FEW_TEMP = 0x04,
AMS_SLAVEPANIC_OPENWIRE = 0x05
} AMSSlavePanicKind;
typedef struct {
float tire_fl;
float tire_fr;
float tire_rl;
float tire_rr;
float brake_fl;
float brake_fr;
float brake_rl;
float brake_rr;
float inv_l;
float inv_r;
float mot_l;
float mot_r;
float bat_l;
float bat_r;
} Temperatures;
typedef struct {
TSState ts_state;
ASState as_state;
Mission active_mission;
int sdc_closed;
R2DProgress r2d_progress;
struct {
int invl_ready : 1;
int invr_ready : 1;
int sdc_bfl : 1;
int sdc_brl : 1;
int sdc_acc : 1;
int sdc_hvb : 1;
int err_sdc : 1;
int err_ams : 1;
int err_pdu : 1;
int err_ini_chk : 1;
int err_con_mon : 1;
int err_scs : 1;
int err_sbspd : 1;
int err_appsp : 1;
int err_as : 1;
int err_ros : 1;
int err_res : 1;
int err_invl : 1;
int err_invr : 1;
} errors;
struct {
AMSErrorKind kind;
uint8_t arg;
} last_ams_error;
struct {
uint8_t id;
AMSSlavePanicKind kind;
uint32_t arg;
} last_ams_slave_panic;
IniChkState ini_chk_state;
unsigned lap_count;
Temperatures temps;
float min_cell_volt;
float max_cell_temp;
int soc;
float ts_current;
float ts_voltage_bat;
float ts_voltage_veh;
float speed;
float brake_press_f;
float brake_press_r;
float distance_total;
} VehicleState;
extern VehicleState vehicle_state;
void vehicle_thread_entry(ULONG hfdcan_addr); void vehicle_thread_entry(ULONG hfdcan_addr);
void vehicle_select_mission(Mission mission);
void vehicle_broadcast_param(ParamType param, int32_t value);
void vehicle_broadcast_buttons(GPIO_PinState *button_states); void vehicle_broadcast_buttons(GPIO_PinState *button_states);
#endif // SIMULATOR
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

156
Core/Inc/vehicle_state.h Normal file
View File

@ -0,0 +1,156 @@
#ifndef __INC_VEHICLE_STATE_H
#define __INC_VEHICLE_STATE_H
#ifdef __cplusplus
extern "C" {
#endif
#include "stw_defines.h"
#include <stdint.h>
typedef enum {
TS_INACTIVE = 0,
TS_ACTIVE = 1,
TS_PRECHARGE = 2,
TS_DISCHARGE = 3,
TS_ERROR = 4,
TS_CHARGING_CHECK = 5,
TS_CHARGING = 6
} TSState;
typedef enum {
AS_OFF = 0,
AS_MANUAL = 1,
AS_READY = 2,
AS_DRIVING = 3,
AS_FINISHED = 4,
AS_EMERGENCY = 5
} ASState;
typedef enum {
R2D_NONE = 0,
R2D_TSMS = 1,
R2D_TSACTIVE = 2,
R2D_RESETTING_NODES = 3,
R2D_RESETTING_COMMS = 4,
R2D_WAITING_INIT = 5,
R2D_INIT_STAGE1 = 6,
R2D_INIT_STAGE2 = 7,
R2D_INIT_SUCCESS = 0xF
} R2DProgress;
typedef enum {
INICHK_START = 0,
INICHK_WD_CHECK = 1,
INICHK_WD_OK = 2,
INICHK_ASB_CHECK_1 = 3,
INICHK_ASB_CHECK_2 = 4,
INICHK_WAIT_TS = 5,
INICHK_EBS_CHECK_A = 6,
INICHK_EBS_CHECK_B = 7,
INICHK_DONE = 8,
INICHK_ERROR = 9
} IniChkState;
typedef enum {
AMS_ERROR_NONE = 0x00,
AMS_ERROR_SLAVE_TIMEOUT = 0x01,
AMS_ERROR_SLAVE_PANIC = 0x02,
AMS_ERROR_SHUNT_TIMEOUT = 0x03,
AMS_ERROR_SHUNT_OVERCURRENT = 0x04,
AMS_ERROR_SHUNT_OVERTEMP = 0x05
} AMSErrorKind;
typedef enum {
AMS_SLAVEPANIC_OVERTEMP = 0x00,
AMS_SLAVEPANIC_UNDERTEMP = 0x01,
AMS_SLAVEPANIC_OVERVOLTAGE = 0x02,
AMS_SLAVEPANIC_UNDERVOLTAGE = 0x03,
AMS_SLAVEPANIC_TOO_FEW_TEMP = 0x04,
AMS_SLAVEPANIC_OPENWIRE = 0x05
} AMSSlavePanicKind;
typedef struct {
float tire_fl;
float tire_fr;
float tire_rl;
float tire_rr;
float brake_fl;
float brake_fr;
float brake_rl;
float brake_rr;
float inv_l;
float inv_r;
float mot_l;
float mot_r;
float bat_l;
float bat_r;
} Temperatures;
typedef struct {
TSState ts_state;
ASState as_state;
Mission active_mission;
int sdc_closed;
R2DProgress r2d_progress;
struct {
int invl_ready : 1;
int invr_ready : 1;
int sdc_bfl : 1;
int sdc_brl : 1;
int sdc_acc : 1;
int sdc_hvb : 1;
int err_sdc : 1;
int err_ams : 1;
int err_pdu : 1;
int err_ini_chk : 1;
int err_con_mon : 1;
int err_scs : 1;
int err_sbspd : 1;
int err_appsp : 1;
int err_as : 1;
int err_ros : 1;
int err_res : 1;
int err_invl : 1;
int err_invr : 1;
} errors;
struct {
AMSErrorKind kind;
uint8_t arg;
} last_ams_error;
struct {
uint8_t id;
AMSSlavePanicKind kind;
uint32_t arg;
} last_ams_slave_panic;
IniChkState ini_chk_state;
unsigned lap_count;
Temperatures temps;
float min_cell_volt;
float max_cell_temp;
int soc;
float ts_current;
float ts_voltage_bat;
float ts_voltage_veh;
float speed;
float brake_press_f;
float brake_press_r;
float distance_total;
} VehicleState;
extern VehicleState vehicle_state;
#ifdef __cplusplus
} // extern "C"
#endif
#endif // __INC_VEHICLE_STATE_H

View File

@ -9,7 +9,7 @@
#include "stm32h7xx_hal_spi.h" #include "stm32h7xx_hal_spi.h"
#include "stm32h7xx_hal_tim.h" #include "stm32h7xx_hal_tim.h"
#include "tx_api.h" #include "tx_api.h"
#include "vehicle.h" #include "vehicle_state.h"
#include <stdint.h> #include <stdint.h>
#define LED_SPEED_MIN 15 // km/h #define LED_SPEED_MIN 15 // km/h

View File

@ -2,6 +2,7 @@
#include "main.h" #include "main.h"
#include "ui.h" #include "ui.h"
#include "vehicle_state.h"
#include "can-halal.h" #include "can-halal.h"
@ -32,8 +33,6 @@
#define CAN_CS_INTERNAL_TEMP_FACTOR 0.01 #define CAN_CS_INTERNAL_TEMP_FACTOR 0.01
#define CAN_ABX_MISC_DISTANCE_TOTAL_FACTOR 0.01 #define CAN_ABX_MISC_DISTANCE_TOTAL_FACTOR 0.01
VehicleState vehicle_state = {0};
void vehicle_thread_entry(ULONG hfdcan_addr) { void vehicle_thread_entry(ULONG hfdcan_addr) {
memset(&vehicle_state, 0, sizeof(vehicle_state)); memset(&vehicle_state, 0, sizeof(vehicle_state));
ftcan_init((void *)hfdcan_addr); ftcan_init((void *)hfdcan_addr);

3
Core/Src/vehicle_state.c Normal file
View File

@ -0,0 +1,3 @@
#include "vehicle_state.h"
VehicleState vehicle_state = {0};

View File

@ -50,6 +50,7 @@ Core/Src/stm32h7xx_it.c \
Core/Src/system_stm32h7xx.c \ Core/Src/system_stm32h7xx.c \
Core/Src/ui.c \ Core/Src/ui.c \
Core/Src/vehicle.c \ Core/Src/vehicle.c \
Core/Src/vehicle_state.c \
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal.c \ Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal.c \
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_cortex.c \ Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_cortex.c \
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_crc.c \ Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_crc.c \

View File

@ -5,10 +5,11 @@
#include "gui/containers/DriverViewFieldSelection.hpp" #include "gui/containers/DriverViewFieldSelection.hpp"
#include "touchgfx/Unicode.hpp" #include "touchgfx/Unicode.hpp"
#include "touchgfx/containers/scrollers/DrawableList.hpp" #include "touchgfx/containers/scrollers/DrawableList.hpp"
#include "vehicle.h"
#include <gui/driverview_screen/DriverViewPresenter.hpp> #include <gui/driverview_screen/DriverViewPresenter.hpp>
#include <gui_generated/driverview_screen/DriverViewViewBase.hpp> #include <gui_generated/driverview_screen/DriverViewViewBase.hpp>
#include "vehicle_state.h"
enum class DriverViewProgressType { PRECHARGE, R2D }; enum class DriverViewProgressType { PRECHARGE, R2D };
class DriverViewView : public DriverViewViewBase { class DriverViewView : public DriverViewViewBase {

View File

@ -2,7 +2,8 @@
#define MODEL_HPP #define MODEL_HPP
#include "stw_defines.h" #include "stw_defines.h"
#include "vehicle.h" #include "vehicle_state.h"
class ModelListener; class ModelListener;
class Model { class Model {

View File

@ -1,8 +1,7 @@
#include <gui/ami_screen/AMIPresenter.hpp> #include <gui/ami_screen/AMIPresenter.hpp>
#include <gui/ami_screen/AMIView.hpp> #include <gui/ami_screen/AMIView.hpp>
#include "main.h" #include "vehicle_state.h"
#include "vehicle.h"
AMIPresenter::AMIPresenter(AMIView &v) : view(v) {} AMIPresenter::AMIPresenter(AMIView &v) : view(v) {}

View File

@ -1,9 +1,10 @@
#include "gui/common/NamedField.hpp" #include "gui/common/NamedField.hpp"
#include "texts/TextKeysAndLanguages.hpp" #include "texts/TextKeysAndLanguages.hpp"
#include "params.h"
#include "touchgfx/Unicode.hpp" #include "touchgfx/Unicode.hpp"
#include "vehicle.h"
#include "params.h"
#include "vehicle_state.h"
#define VEH_FIELD(FIELD) []() { return (void *)&vehicle_state.FIELD; } #define VEH_FIELD(FIELD) []() { return (void *)&vehicle_state.FIELD; }
#define VEH_BIT_FIELD(FIELD) \ #define VEH_BIT_FIELD(FIELD) \

View File

@ -1,7 +1,8 @@
#include <gui/containers/DriverViewStatusItem.hpp> #include <gui/containers/DriverViewStatusItem.hpp>
#include "texts/TextKeysAndLanguages.hpp" #include "texts/TextKeysAndLanguages.hpp"
#include "vehicle.h"
#include "vehicle_state.h"
DriverViewStatusItem::DriverViewStatusItem() {} DriverViewStatusItem::DriverViewStatusItem() {}

View File

@ -2,7 +2,7 @@
#include "texts/TextKeysAndLanguages.hpp" #include "texts/TextKeysAndLanguages.hpp"
#include "touchgfx/Unicode.hpp" #include "touchgfx/Unicode.hpp"
#include "vehicle.h" #include "vehicle_state.h"
#include <cstdio> #include <cstdio>

View File

@ -2,7 +2,8 @@
#include <gui/driverview_screen/DriverViewView.hpp> #include <gui/driverview_screen/DriverViewView.hpp>
#include "gui/common/NamedField.hpp" #include "gui/common/NamedField.hpp"
#include "vehicle.h"
#include "vehicle_state.h"
DriverViewPresenter::DriverViewPresenter(DriverViewView &v) DriverViewPresenter::DriverViewPresenter(DriverViewView &v)
: view(v), fields{DF_MinCellVolt, DF_Speed, DF_MaxCellTemp} {} : view(v), fields{DF_MinCellVolt, DF_Speed, DF_MaxCellTemp} {}

View File

@ -6,10 +6,12 @@
#include "touchgfx/Callback.hpp" #include "touchgfx/Callback.hpp"
#include "touchgfx/Drawable.hpp" #include "touchgfx/Drawable.hpp"
#include "touchgfx/Unicode.hpp" #include "touchgfx/Unicode.hpp"
#include "vehicle.h"
#include <gui/driverview_screen/DriverViewView.hpp> #include <gui/driverview_screen/DriverViewView.hpp>
#include <stddef.h> #include <cmath>
#include <cstddef>
#include "vehicle_state.h"
DriverViewView::DriverViewView() DriverViewView::DriverViewView()
: fieldTypes{DF_MinCellVolt, DF_Speed, DF_TSCurrent} {} : fieldTypes{DF_MinCellVolt, DF_Speed, DF_TSCurrent} {}
@ -87,16 +89,16 @@ void DriverViewView::updateStatusItems() {
} }
void DriverViewView::setTemps(const Temperatures &temps) { void DriverViewView::setTemps(const Temperatures &temps) {
brakeTempFL.setTemp(roundf(temps.brake_fl)); brakeTempFL.setTemp(std::round(temps.brake_fl));
brakeTempFR.setTemp(roundf(temps.brake_fr)); brakeTempFR.setTemp(std::round(temps.brake_fr));
brakeTempRL.setTemp(roundf(temps.brake_rl)); brakeTempRL.setTemp(std::round(temps.brake_rl));
brakeTempRR.setTemp(roundf(temps.brake_rr)); brakeTempRR.setTemp(std::round(temps.brake_rr));
invTempL.setTemp(roundf(temps.inv_l)); invTempL.setTemp(std::round(temps.inv_l));
invTempR.setTemp(roundf(temps.inv_r)); invTempR.setTemp(std::round(temps.inv_r));
motorTempL.setTemp(roundf(temps.mot_l)); motorTempL.setTemp(std::round(temps.mot_l));
motorTempR.setTemp(roundf(temps.mot_r)); motorTempR.setTemp(std::round(temps.mot_r));
batTempL.setTemp(roundf(temps.bat_l)); batTempL.setTemp(std::round(temps.bat_l));
batTempR.setTemp(roundf(temps.bat_r)); batTempR.setTemp(std::round(temps.bat_r));
} }
void DriverViewView::setTSSoC(uint8_t soc) { void DriverViewView::setTSSoC(uint8_t soc) {

View File

@ -1,10 +1,11 @@
#include "gui/common/FrontendApplication.hpp" #include "gui/common/FrontendApplication.hpp"
#include "stw_defines.h"
#include "touchgfx/Application.hpp" #include "touchgfx/Application.hpp"
#include "vehicle.h"
#include <gui/missionselect_screen/MissionSelectPresenter.hpp> #include <gui/missionselect_screen/MissionSelectPresenter.hpp>
#include <gui/missionselect_screen/MissionSelectView.hpp> #include <gui/missionselect_screen/MissionSelectView.hpp>
#include "stw_defines.h"
#include "vehicle_state.h"
MissionSelectPresenter::MissionSelectPresenter(MissionSelectView &v) MissionSelectPresenter::MissionSelectPresenter(MissionSelectView &v)
: view(v) {} : view(v) {}

View File

@ -1,9 +1,11 @@
#include "gui/missionselect_screen/MissionSelectPresenter.hpp" #include "gui/missionselect_screen/MissionSelectPresenter.hpp"
#include "stw_defines.h"
#include "texts/TextKeysAndLanguages.hpp" #include "texts/TextKeysAndLanguages.hpp"
#include "vehicle.h"
#include <gui/missionselect_screen/MissionSelectView.hpp> #include <gui/missionselect_screen/MissionSelectView.hpp>
#include "stw_defines.h"
#include "vehicle.h"
#include "vehicle_state.h"
MissionSelectView::MissionSelectView() MissionSelectView::MissionSelectView()
: selected{nullptr}, selectedMission{MISSION_NONE} {} : selected{nullptr}, selectedMission{MISSION_NONE} {}

View File

@ -1,15 +1,19 @@
#include <gui/model/Model.hpp>
#include <gui/model/ModelListener.hpp>
Model::Model() : modelListener(0) {}
#ifdef SIMULATOR
void Model::tick() { modelListener->vehicleStateUpdated(); }
#else
#include "main.h" #include "main.h"
#include "stm32h7xx_hal.h" #include "stm32h7xx_hal.h"
#include "stm32h7xx_hal_gpio.h" #include "stm32h7xx_hal_gpio.h"
#include "stw_defines.h" #include "stw_defines.h"
#include "tx_api.h" #include "tx_api.h"
#include "ui.h" #include "ui.h"
#include "vehicle.h" #include "vehicle_state.h"
#include <gui/model/Model.hpp>
#include <gui/model/ModelListener.hpp>
Model::Model() : modelListener(0) {}
void Model::tick() { void Model::tick() {
ULONG events; ULONG events;
@ -25,3 +29,5 @@ void Model::tick() {
modelListener->vehicleStateUpdated(); modelListener->vehicleStateUpdated();
} }
} }
#endif // SIMULATOR

View File

@ -1,6 +1,5 @@
#include "gui/common/NamedField.hpp" #include "gui/common/NamedField.hpp"
#include "gui/containers/ConfigItem.hpp" #include "gui/containers/ConfigItem.hpp"
#include "main.h"
#include "params.h" #include "params.h"
#include <cstdint> #include <cstdint>
#include <gui/vehicleconfig_screen/VehicleConfigView.hpp> #include <gui/vehicleconfig_screen/VehicleConfigView.hpp>
@ -76,7 +75,7 @@ void VehicleConfigView::updateSelectedParam(int select) {
int16_t firstVisible = firstItem->getType(); int16_t firstVisible = firstItem->getType();
int16_t lastVisible = lastItem->getType(); int16_t lastVisible = lastItem->getType();
if (lastVisible < firstVisible) { if (lastVisible < firstVisible) {
Error_Handler(); return;
} }
int16_t numVisible = lastVisible - firstVisible + 1; int16_t numVisible = lastVisible - firstVisible + 1;
if (selectedParam >= firstVisible && selectedParam <= lastVisible) { if (selectedParam >= firstVisible && selectedParam <= lastVisible) {

View File

@ -1,24 +1,27 @@
#include <platform/hal/simulator/sdl2/HALSDL2.hpp> #include "gui/model/Model.hpp"
#include <touchgfx/hal/NoDMA.hpp> #include "params.h"
#include "vehicle.h"
#include "vehicle_state.h"
#include <common/TouchGFXInit.hpp> #include <common/TouchGFXInit.hpp>
#include <gui_generated/common/SimConstants.hpp> #include <gui_generated/common/SimConstants.hpp>
#include <platform/driver/touch/SDL2TouchController.hpp> #include <platform/driver/touch/SDL2TouchController.hpp>
#include <touchgfx/lcd/LCD.hpp> #include <platform/hal/simulator/sdl2/HALSDL2.hpp>
#include <stdlib.h>
#include <simulator/mainBase.hpp> #include <simulator/mainBase.hpp>
#include <stdlib.h>
#include <touchgfx/hal/NoDMA.hpp>
#include <touchgfx/lcd/LCD.hpp>
using namespace touchgfx; using namespace touchgfx;
#ifdef __linux__ #ifdef __linux__
int main(int argc, char** argv) int main(int argc, char **argv) {
{
#else #else
#include <shellapi.h> #include <shellapi.h>
#ifdef _UNICODE #ifdef _UNICODE
#error Cannot run in unicode mode #error Cannot run in unicode mode
#endif #endif
int CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) int CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
{ LPSTR lpCmdLine, int nCmdShow) {
int argc; int argc;
char **argv = touchgfx::HALSDL2::getArgv(&argc); char **argv = touchgfx::HALSDL2::getArgv(&argc);
#endif #endif
@ -27,7 +30,8 @@ int CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLi
LCD &lcd = setupLCD(); LCD &lcd = setupLCD();
touchgfx::SDL2TouchController tc; touchgfx::SDL2TouchController tc;
touchgfx::HAL& hal = touchgfx::touchgfx_generic_init<touchgfx::HALSDL2>(dma, lcd, tc, SIM_WIDTH, SIM_HEIGHT, 0, 0); touchgfx::HAL &hal = touchgfx::touchgfx_generic_init<touchgfx::HALSDL2>(
dma, lcd, tc, SIM_WIDTH, SIM_HEIGHT, 0, 0);
setupSimulator(argc, argv, hal); setupSimulator(argc, argv, hal);
@ -42,3 +46,13 @@ int CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLi
return EXIT_SUCCESS; return EXIT_SUCCESS;
} }
// Stubs
extern "C" {
VehicleState vehicle_state;
void params_dec(ParamType param) {}
void params_inc(ParamType param) {}
void params_broadcast(ParamType param) {}
void vehicle_select_mission(Mission mission) {}
Params params;
}