steering-wheel/Core/Inc/params.h

38 lines
603 B
C

#ifndef INC_PARAMS_H
#define INC_PARAMS_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stddef.h>
#include <stdint.h>
#include "util.h"
CountedEnum(ParamType, size_t, PF_BBAL, PF_SLIPREF, PF_MUMAX, PF_ASRP, PF_ASRON,
PF_ASRI, PF_PLIM);
typedef struct {
float bbal;
float slipref;
float mumax;
unsigned asrp;
unsigned asri;
unsigned asron;
unsigned plim;
} Params;
extern Params params;
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