steering-wheel/Core/Inc/params.h

36 lines
666 B
C
Raw Normal View History

#ifndef INC_PARAMS_H
#define INC_PARAMS_H
#ifdef __cplusplus
extern "C" {
#endif
2023-04-04 22:05:50 +02:00
#include <stddef.h>
#include <stdint.h>
2023-04-04 22:05:50 +02:00
#include "util.h"
2024-07-22 08:43:42 +02:00
CountedEnum(ParamType, size_t, PF_PLIM, PF_TLIM, PF_SLIM, PF_TVEC, PF_PG, PF_REKU);
2023-04-04 22:05:50 +02:00
typedef struct {
2024-07-22 08:43:42 +02:00
unsigned plim; //< Power limit
unsigned tlim; //< Torque limit
unsigned slim; //< Speed limit
unsigned tvec; //< Torque vectoring
unsigned pg; //< Power ground
unsigned reku; //< Rekuperation
} Params;
extern Params params;
2023-04-04 22:05:50 +02:00
void params_init();
void params_inc(ParamType param);
void params_dec(ParamType param);
void params_broadcast(ParamType param);
#ifdef __cplusplus
}
#endif
#endif // INC_PARAMS_H