fb2c083551
Validate / build-test (macos-latest) (push) Failing after 3s
Validate / build-test (windows-latest) (push) Failing after 15s
Validate / build-test (ubuntu-latest) (push) Successful in 17s
Validate / reports (push) Successful in 50s
Release / release (push) Successful in 50s
Phase 2 of the English translation: Word documents (filled, EPB-specific): - 8 plans (PID, PM, QA, SWE, Test, Project Manual, CM, RM) - 6 safety docs (HARA, Safety Case, FMEDA, MISRA Compliance, Verification Report, Tool Qualification Cppcheck) - 2 manuals (User, Service) - 3 audit artefacts (Review minutes, NC-001, MISRA-REC-001) - All regenerated via pandoc from English markdown sources Code, tests, headers: - All file headers, struct comments, function docstrings in English - All test names (TEST_BEGIN strings) translated - Inline comments translated - 46 tests still green after translation CI workflows: - All step names in English - Step descriptions, comments, release notes template in English README.md fully rewritten in English with proper guided tour. Phase 3 (still pending): dev-process repo templates + toolstack/setup docs.
44 lines
1.2 KiB
C
44 lines
1.2 KiB
C
/**
|
|
* @file apply_controller.h
|
|
* @brief Apply/Hold/Release control of the EPB.
|
|
*
|
|
* @arch SWA-002
|
|
* @reqs SWE-001 SWE-002 SWE-003 SWE-004
|
|
*
|
|
* ASIL: D
|
|
*/
|
|
#ifndef APPLY_CONTROLLER_H
|
|
#define APPLY_CONTROLLER_H
|
|
|
|
#include "epb_types.h"
|
|
|
|
typedef struct {
|
|
SwitchState sw_state; /* aus SwitchDebouncer */
|
|
bool standstill; /* aus Wheel-Speed-Plausi */
|
|
bool engine_running;
|
|
bool brake_pedal_pressed;
|
|
bool gear_engaged;
|
|
bool safety_apply_request; /* aus SafetyManager */
|
|
uint16_t left_force_n;
|
|
uint16_t right_force_n;
|
|
} ApplyInputs;
|
|
|
|
#define APPLY_TARGET_FORCE_N 12000U /* Target clamping force per actuator */
|
|
#define APPLY_TIMEOUT_50MS 30U /* 30 * 50ms = 1500 ms */
|
|
#define HOLD_TOLERANCE_N 1200U /* 10% of target */
|
|
|
|
EpbStatus apply_ctrl_init(void);
|
|
|
|
/**
|
|
* @brief 50 ms step function.
|
|
*
|
|
* @reqs SWE-001 SWE-002 SWE-003 SWE-004
|
|
*/
|
|
void apply_ctrl_step_50ms(const ApplyInputs* in);
|
|
|
|
EpbState apply_ctrl_get_state(void);
|
|
EpbStatus apply_ctrl_last_error(void);
|
|
uint32_t apply_ctrl_get_step_count(void); /* Watchdog alive counter */
|
|
|
|
#endif /* APPLY_CONTROLLER_H */
|