steering-wheel/Core/Inc/params.h

38 lines
603 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"
2023-04-12 13:48:02 +02:00
CountedEnum(ParamType, size_t, PF_BBAL, PF_SLIPREF, PF_MUMAX, PF_ASRP, PF_ASRON,
2023-08-01 19:43:09 +02:00
PF_ASRI, PF_PLIM);
2023-04-04 22:05:50 +02:00
typedef struct {
float bbal;
2023-04-11 21:10:20 +02:00
float slipref;
2023-04-12 13:48:02 +02:00
float mumax;
2023-04-11 21:10:20 +02:00
unsigned asrp;
2023-06-26 17:18:51 +02:00
unsigned asri;
2023-04-11 21:10:20 +02:00
unsigned asron;
2023-08-01 19:43:09 +02:00
unsigned plim;
} 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