feat(i18n): full English translation of demo-epb
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.
This commit is contained in:
Stefan Lohmaier
2026-05-12 03:37:51 -07:00
parent a47e0aed3e
commit fb2c083551
54 changed files with 1528 additions and 1600 deletions
+10 -10
View File
@@ -1,6 +1,6 @@
/**
* @file test_actuator_driver.c
* @brief Unit-Tests fuer den Actuator-Driver.
* @brief Unit tests for the Actuator Driver.
*
* @reqs SWE-006 SWE-013 SWE-014 SWE-015
* @arch SWA-003
@@ -12,7 +12,7 @@ TestStats g_test_stats = {0, 0};
static void test_init(void)
{
TEST_BEGIN("init -> beide Aktoren STOP, 0 mA");
TEST_BEGIN("init -> both actuators STOP, 0 mA");
ASSERT_EQ(actuator_init(), EPB_OK);
ActuatorStatus l = actuator_get_status(ACTUATOR_LEFT);
ActuatorStatus r = actuator_get_status(ACTUATOR_RIGHT);
@@ -61,7 +61,7 @@ static void test_release_normal(void)
static void test_isr_samples_current(void)
{
TEST_BEGIN("ISR-Sample setzt current_ma und peak");
TEST_BEGIN("ISR sample sets current_ma and peak");
(void)actuator_init();
(void)actuator_apply(ACTUATOR_LEFT, 80);
actuator_isr_1khz(ACTUATOR_LEFT, 3000);
@@ -73,10 +73,10 @@ static void test_isr_samples_current(void)
static void test_overcurrent_cutoff_after_100ms(void)
{
TEST_BEGIN("Overcurrent > 8 A fuer 100 ms -> STOP + overcurrent flag");
TEST_BEGIN("Overcurrent > 8 A for 100 ms -> STOP + overcurrent flag");
(void)actuator_init();
(void)actuator_apply(ACTUATOR_LEFT, 80);
/* 100 Samples (= 100 ms bei 1 kHz) ueber 8 A */
/* 100 samples (= 100 ms at 1 kHz) above 8 A */
for (int i = 0; i < 100; ++i) {
actuator_isr_1khz(ACTUATOR_LEFT, 8500);
}
@@ -89,7 +89,7 @@ static void test_overcurrent_cutoff_after_100ms(void)
static void test_overcurrent_below_window_no_cutoff(void)
{
TEST_BEGIN("Overcurrent < 100 ms loest noch nicht aus");
TEST_BEGIN("Overcurrent < 100 ms does not trip yet");
(void)actuator_init();
(void)actuator_apply(ACTUATOR_LEFT, 80);
for (int i = 0; i < 50; ++i) {
@@ -103,7 +103,7 @@ static void test_overcurrent_below_window_no_cutoff(void)
static void test_overcurrent_blocks_subsequent_apply(void)
{
TEST_BEGIN("nach Overcurrent: weiterer apply -> EOVERCURRENT");
TEST_BEGIN("after overcurrent: subsequent apply -> EOVERCURRENT");
(void)actuator_init();
(void)actuator_apply(ACTUATOR_LEFT, 80);
for (int i = 0; i < 120; ++i) {
@@ -116,11 +116,11 @@ static void test_overcurrent_blocks_subsequent_apply(void)
static void test_clamping_force_estimate(void)
{
TEST_BEGIN("Klemmkraft-Schaetzung aus Peak-Strom (SWE-015)");
TEST_BEGIN("Clamping force estimation from peak current (SWE-015)");
(void)actuator_init();
(void)actuator_apply(ACTUATOR_LEFT, 80);
actuator_isr_1khz(ACTUATOR_LEFT, 4000); /* 4 A Peak */
actuator_isr_1khz(ACTUATOR_LEFT, 3500); /* danach niedriger */
actuator_isr_1khz(ACTUATOR_LEFT, 4000); /* 4 A peak */
actuator_isr_1khz(ACTUATOR_LEFT, 3500); /* then lower */
ActuatorStatus s = actuator_get_status(ACTUATOR_LEFT);
/* F = (4000 * 2500) / 1000 = 10000 N */
ASSERT_EQ(s.clamping_force_n, 10000);
+14 -14
View File
@@ -1,6 +1,6 @@
/**
* @file test_apply_controller.c
* @brief Unit-Tests fuer den Apply-Controller (ASIL-D Kern).
* @brief Unit tests for the Apply Controller (ASIL-D core).
*
* @reqs SWE-001 SWE-002 SWE-003 SWE-004 SWE-005
* @arch SWA-002
@@ -56,7 +56,7 @@ static void test_null_input(void)
static void test_apply_request_starts_applying(void)
{
TEST_BEGIN("Apply-Request bei Stillstand -> APPLYING");
TEST_BEGIN("Apply request at standstill -> APPLYING");
(void)actuator_init();
(void)apply_ctrl_init();
ApplyInputs in = make_idle_inputs();
@@ -68,7 +68,7 @@ static void test_apply_request_starts_applying(void)
static void test_no_apply_without_standstill(void)
{
TEST_BEGIN("Apply-Request ohne Stillstand wird ignoriert");
TEST_BEGIN("Apply request without standstill is ignored");
(void)actuator_init();
(void)apply_ctrl_init();
ApplyInputs in = make_idle_inputs();
@@ -81,7 +81,7 @@ static void test_no_apply_without_standstill(void)
static void test_applying_reaches_applied_on_target_force(void)
{
TEST_BEGIN("APPLYING -> APPLIED wenn beide Klemmkraefte >= Target");
TEST_BEGIN("APPLYING -> APPLIED when both clamping forces >= target");
(void)actuator_init();
(void)apply_ctrl_init();
ApplyInputs in = make_idle_inputs();
@@ -97,14 +97,14 @@ static void test_applying_reaches_applied_on_target_force(void)
static void test_applying_timeout_to_error(void)
{
TEST_BEGIN("APPLYING-Timeout (>30 Steps) -> ERROR");
TEST_BEGIN("APPLYING timeout (>30 steps) -> ERROR");
(void)actuator_init();
(void)apply_ctrl_init();
ApplyInputs in = make_idle_inputs();
in.sw_state = SWITCH_APPLY;
apply_ctrl_step_50ms(&in); /* -> APPLYING */
in.sw_state = SWITCH_NEUTRAL;
/* Klemmkraefte bleiben bei 0 -> Timeout nach 30 Steps */
/* Clamping forces stay at 0 -> timeout after 30 steps */
apply_full_cycle_until_state(&in, EPB_STATE_ERROR, 35);
ASSERT_EQ(apply_ctrl_get_state(), EPB_STATE_ERROR);
ASSERT_EQ(apply_ctrl_last_error(), EPB_ETIMEOUT);
@@ -113,7 +113,7 @@ static void test_applying_timeout_to_error(void)
static void test_applied_holds_force(void)
{
TEST_BEGIN("APPLIED haelt Klemmkraft (SWE-001)");
TEST_BEGIN("APPLIED maintains clamping force (SWE-001)");
(void)actuator_init();
(void)apply_ctrl_init();
ApplyInputs in = make_idle_inputs();
@@ -124,18 +124,18 @@ static void test_applied_holds_force(void)
in.right_force_n = 12000;
apply_ctrl_step_50ms(&in); /* -> APPLIED */
/* Klemmkraft sinkt auf 10000 (unter Toleranz-Schwelle 10800) */
/* Clamping force drops to 10000 (below tolerance threshold 10800) */
in.left_force_n = 10000;
in.right_force_n = 10000;
apply_ctrl_step_50ms(&in);
/* Apply-Controller muss nachregeln -> APPLYING */
/* Apply controller must re-apply -> APPLYING */
ASSERT_EQ(apply_ctrl_get_state(), EPB_STATE_APPLYING);
TEST_END();
}
static void test_release_requires_preconditions(void)
{
TEST_BEGIN("Release ohne Engine wird abgelehnt");
TEST_BEGIN("Release without engine is rejected");
(void)actuator_init();
(void)apply_ctrl_init();
ApplyInputs in = make_idle_inputs();
@@ -155,7 +155,7 @@ static void test_release_requires_preconditions(void)
static void test_release_with_preconditions(void)
{
TEST_BEGIN("Release mit allen Voraussetzungen -> RELEASING -> RELEASED");
TEST_BEGIN("Release with all preconditions -> RELEASING -> RELEASED");
(void)actuator_init();
(void)apply_ctrl_init();
ApplyInputs in = make_idle_inputs();
@@ -180,7 +180,7 @@ static void test_release_with_preconditions(void)
static void test_safety_apply_request(void)
{
TEST_BEGIN("Safety-Manager Apply-Request (Hill-Hold/Auto-Apply)");
TEST_BEGIN("Safety Manager apply request (Hill-Hold/Auto-Apply)");
(void)actuator_init();
(void)apply_ctrl_init();
ApplyInputs in = make_idle_inputs();
@@ -193,7 +193,7 @@ static void test_safety_apply_request(void)
static void test_watchdog_alive_counter(void)
{
TEST_BEGIN("Step-Counter steigt monoton (SWE-002 Watchdog-Alive)");
TEST_BEGIN("Step counter increases monotonically (SWE-002 watchdog alive)");
(void)actuator_init();
(void)apply_ctrl_init();
ApplyInputs in = make_idle_inputs();
@@ -207,7 +207,7 @@ static void test_watchdog_alive_counter(void)
static void test_error_state_recoverable(void)
{
TEST_BEGIN("ERROR -> RELEASED bei neutralem Switch");
TEST_BEGIN("ERROR -> RELEASED on neutral switch");
(void)actuator_init();
(void)apply_ctrl_init();
ApplyInputs in = make_idle_inputs();
+20 -20
View File
@@ -1,6 +1,6 @@
/**
* @file test_safety_manager.c
* @brief Unit-Tests fuer den Safety Manager (ASIL-D).
* @brief Unit tests for the Safety Manager (ASIL-D).
*
* @reqs SWE-007 SWE-008 SWE-009 SWE-010 SWE-011 SWE-012
* @arch SWA-001
@@ -38,7 +38,7 @@ static void step_n(SafetyInputs* in, int n)
static void test_init(void)
{
TEST_BEGIN("init -> IDLE, kein Apply-Request");
TEST_BEGIN("init -> IDLE, no apply request");
ASSERT_EQ(safety_mgr_init(), EPB_OK);
ASSERT_EQ(safety_mgr_get_state(), SAFETY_IDLE);
ASSERT_TRUE(!safety_mgr_apply_requested());
@@ -47,7 +47,7 @@ static void test_init(void)
static void test_null_input(void)
{
TEST_BEGIN("NULL Input ist no-op");
TEST_BEGIN("NULL input is a no-op");
(void)safety_mgr_init();
safety_mgr_step_50ms(NULL);
ASSERT_EQ(safety_mgr_get_state(), SAFETY_IDLE);
@@ -58,7 +58,7 @@ static void test_null_input(void)
static void test_auto_apply_armed_on_engine_off(void)
{
TEST_BEGIN("SWE-007: Motor aus + Stillstand -> AUTO_APPLY_ARMED");
TEST_BEGIN("SWE-007: engine off + standstill -> AUTO_APPLY_ARMED");
(void)safety_mgr_init();
SafetyInputs in = make_driving();
in.engine_running = false;
@@ -71,7 +71,7 @@ static void test_auto_apply_armed_on_engine_off(void)
static void test_auto_apply_triggers_after_2s(void)
{
TEST_BEGIN("SWE-008: nach ca. 2s -> TRIGGERED + Apply-Request");
TEST_BEGIN("SWE-008: after ~2s -> TRIGGERED + apply request");
(void)safety_mgr_init();
SafetyInputs in = make_driving();
in.engine_running = false;
@@ -92,7 +92,7 @@ static void test_auto_apply_triggers_after_2s(void)
static void test_auto_apply_aborts_on_engine_on(void)
{
TEST_BEGIN("Auto-Apply bricht ab wenn Motor wieder an");
TEST_BEGIN("Auto-Apply aborts when engine comes back on");
(void)safety_mgr_init();
SafetyInputs in = make_driving();
in.engine_running = false;
@@ -107,7 +107,7 @@ static void test_auto_apply_aborts_on_engine_on(void)
static void test_auto_apply_returns_idle_when_applied(void)
{
TEST_BEGIN("AUTO_APPLY_TRIGGERED -> IDLE wenn Apply Controller fertig");
TEST_BEGIN("AUTO_APPLY_TRIGGERED -> IDLE when Apply Controller is done");
(void)safety_mgr_init();
SafetyInputs in = make_driving();
in.engine_running = false;
@@ -129,7 +129,7 @@ static void test_auto_apply_returns_idle_when_applied(void)
static void test_hillhold_arms_on_grade_brake_standstill(void)
{
TEST_BEGIN("SWE-009: Grad >5% + Stillstand + Bremse -> HILL_HOLD_ARMED");
TEST_BEGIN("SWE-009: grade >5% + standstill + brake -> HILL_HOLD_ARMED");
(void)safety_mgr_init();
SafetyInputs in = make_standstill();
in.grade_percent = 8.0f;
@@ -141,7 +141,7 @@ static void test_hillhold_arms_on_grade_brake_standstill(void)
static void test_hillhold_negative_grade_also_triggers(void)
{
TEST_BEGIN("Hill-Hold auch bei negativem Grad (abschuessig)");
TEST_BEGIN("Hill-hold also on negative grade (downhill)");
(void)safety_mgr_init();
SafetyInputs in = make_standstill();
in.grade_percent = -7.0f;
@@ -152,7 +152,7 @@ static void test_hillhold_negative_grade_also_triggers(void)
static void test_hillhold_below_threshold_no_arm(void)
{
TEST_BEGIN("Grad < 5% -> kein Hill-Hold");
TEST_BEGIN("Grade < 5% -> no hill-hold");
(void)safety_mgr_init();
SafetyInputs in = make_standstill();
in.grade_percent = 4.0f;
@@ -163,7 +163,7 @@ static void test_hillhold_below_threshold_no_arm(void)
static void test_hillhold_active_on_brake_release(void)
{
TEST_BEGIN("SWE-010: Bremse losgelassen -> HILL_HOLD_ACTIVE + Apply-Request");
TEST_BEGIN("SWE-010: brake released -> HILL_HOLD_ACTIVE + apply request");
(void)safety_mgr_init();
SafetyInputs in = make_standstill();
in.grade_percent = 8.0f;
@@ -177,7 +177,7 @@ static void test_hillhold_active_on_brake_release(void)
static void test_hillhold_active_ends_on_vehicle_rolling(void)
{
TEST_BEGIN("HILL_HOLD_ACTIVE endet wenn Fahrzeug rollt (v > 2 km/h)");
TEST_BEGIN("HILL_HOLD_ACTIVE ends when vehicle rolls (v > 2 km/h)");
(void)safety_mgr_init();
SafetyInputs in = make_standstill();
in.grade_percent = 8.0f;
@@ -193,7 +193,7 @@ static void test_hillhold_active_ends_on_vehicle_rolling(void)
static void test_hillhold_armed_to_idle_if_grade_drops(void)
{
TEST_BEGIN("HILL_HOLD_ARMED -> IDLE wenn Grad < 5% wird");
TEST_BEGIN("HILL_HOLD_ARMED -> IDLE when grade < 5%");
(void)safety_mgr_init();
SafetyInputs in = make_standstill();
in.grade_percent = 8.0f;
@@ -226,7 +226,7 @@ static SafetyInputs make_applied_at_rest(void)
static void test_drive_away_armed_on_intent(void)
{
TEST_BEGIN("SWE-011 + SWE-012: Anfahrabsicht + Safety -> DRIVE_AWAY + Release-Request");
TEST_BEGIN("SWE-011 + SWE-012: intent + safety -> DRIVE_AWAY + release request");
(void)safety_mgr_init();
SafetyInputs in = make_applied_at_rest();
in.gas_pedal_percent = 25.0f;
@@ -239,12 +239,12 @@ static void test_drive_away_armed_on_intent(void)
static void test_drive_away_blocked_without_safety(void)
{
TEST_BEGIN("SWE-012: Tuer offen blockiert Drive-Away");
TEST_BEGIN("SWE-012: door open blocks drive-away");
(void)safety_mgr_init();
SafetyInputs in = make_applied_at_rest();
in.gas_pedal_percent = 25.0f;
in.gear_in_drive = true;
in.door_closed = false; /* Tuer offen */
in.door_closed = false; /* door open */
safety_mgr_step_50ms(&in);
ASSERT_EQ(safety_mgr_get_state(), SAFETY_IDLE);
ASSERT_TRUE(!safety_mgr_release_requested());
@@ -253,7 +253,7 @@ static void test_drive_away_blocked_without_safety(void)
static void test_drive_away_blocked_without_seatbelt(void)
{
TEST_BEGIN("SWE-012: Gurt nicht angelegt blockiert Drive-Away");
TEST_BEGIN("SWE-012: seatbelt not fastened blocks drive-away");
(void)safety_mgr_init();
SafetyInputs in = make_applied_at_rest();
in.gas_pedal_percent = 25.0f;
@@ -266,7 +266,7 @@ static void test_drive_away_blocked_without_seatbelt(void)
static void test_drive_away_blocked_below_gas_threshold(void)
{
TEST_BEGIN("SWE-011: Gas < 10% loest kein Drive-Away aus");
TEST_BEGIN("SWE-011: throttle < 10% does not trigger drive-away");
(void)safety_mgr_init();
SafetyInputs in = make_applied_at_rest();
in.gas_pedal_percent = 5.0f;
@@ -278,7 +278,7 @@ static void test_drive_away_blocked_below_gas_threshold(void)
static void test_drive_away_ends_when_released(void)
{
TEST_BEGIN("DRIVE_AWAY -> IDLE wenn Apply Controller geloest hat");
TEST_BEGIN("DRIVE_AWAY -> IDLE when Apply Controller has released");
(void)safety_mgr_init();
SafetyInputs in = make_applied_at_rest();
in.gas_pedal_percent = 25.0f;
@@ -293,7 +293,7 @@ static void test_drive_away_ends_when_released(void)
static void test_already_applied_does_not_arm_auto_apply(void)
{
TEST_BEGIN("Bereits Applied: kein Auto-Apply Arming");
TEST_BEGIN("Already applied: no auto-apply arming");
(void)safety_mgr_init();
SafetyInputs in = make_driving();
in.engine_running = false;
+1 -1
View File
@@ -1,6 +1,6 @@
/**
* @file test_switch_debouncer.c
* @brief Unit-Tests fuer den Switch-Debouncer.
* @brief Unit tests for the Switch Debouncer.
*
* @reqs SWE-025
* @arch SWA-006