demo-epb  v1.0
Elektrische Parkbremse - slohmaier Dev Process Demo
apply_controller.h
gehe zur Dokumentation dieser Datei
1 /**
2  * @file apply_controller.h
3  * @brief Apply/Hold/Release-Steuerung der EPB.
4  *
5  * @arch SWA-002
6  * @reqs SWE-001 SWE-002 SWE-003 SWE-004
7  *
8  * ASIL: D
9  */
10 #ifndef APPLY_CONTROLLER_H
11 #define APPLY_CONTROLLER_H
12 
13 #include "epb_types.h"
14 
15 typedef struct {
16  SwitchState sw_state; /* aus SwitchDebouncer */
17  bool standstill; /* aus Wheel-Speed-Plausi */
21  bool safety_apply_request; /* aus SafetyManager */
22  uint16_t left_force_n;
23  uint16_t right_force_n;
24 } ApplyInputs;
25 
26 #define APPLY_TARGET_FORCE_N 12000U /* Ziel-Klemmkraft je Aktor */
27 #define APPLY_TIMEOUT_50MS 30U /* 30 * 50ms = 1500 ms */
28 #define HOLD_TOLERANCE_N 1200U /* 10% von Ziel */
29 
31 
32 /**
33  * @brief Step-Funktion 50 ms.
34  *
35  * @reqs SWE-001 SWE-002 SWE-003 SWE-004
36  */
37 void apply_ctrl_step_50ms(const ApplyInputs* in);
38 
41 uint32_t apply_ctrl_get_step_count(void); /* Watchdog-Alive-Counter */
42 
43 #endif /* APPLY_CONTROLLER_H */
EpbStatus apply_ctrl_init(void)
EpbState apply_ctrl_get_state(void)
uint32_t apply_ctrl_get_step_count(void)
EpbStatus apply_ctrl_last_error(void)
void apply_ctrl_step_50ms(const ApplyInputs *in)
Step-Funktion 50 ms.
Gemeinsame Typen fuer die EPB-Software.
EpbState
Definition: epb_types.h:22
EpbStatus
Definition: epb_types.h:13
SwitchState
Definition: epb_types.h:36
bool safety_apply_request
bool brake_pedal_pressed
SwitchState sw_state
uint16_t right_force_n
uint16_t left_force_n