Legacy branch migration

This commit is contained in:
2024-03-12 21:23:47 +02:00
parent 02cb3a9c70
commit ddf9d263b1
139 changed files with 2476 additions and 14269 deletions

36
firmware/logic/force.h Normal file
View File

@@ -0,0 +1,36 @@
#ifndef FORCE_LOGIC_H_
#define FORCE_LOGIC_H_
/**** Includes ****/
#include <stdint.h>
#include "../devices/analog.h"
#include "../devices/inputs.h"
/**** Public definitions ****/
typedef enum {
BM_OPEN,
BM_KEEP,
BM_LOCK
} brakeMode_t;
typedef enum {
IM_BUTTONS,
IM_POT
} inputMode_t;
/**** Public function declarations ****/
void Force_CfgInputMode(inputMode_t in_mode);
inputMode_t Force_GetInputMode(void);
uint8_t Force_Update(inputs_t* inputs, analog_t* meas);
void Force_SetBrakeMode(uint8_t bmode);
brakeMode_t Force_GetBrakeMode(void);
uint8_t Force_IsNewBrakeMode(void);
void Force_ResetNewBrakeMode(void);
void Force_SetUserForce(uint8_t force);
uint8_t Force_IsNewUserForce(void);
void Force_ResetNewUserForce(void);
#endif /* FORCE_LOGIC_H_ */