Docs and code: translate Polish comments, messages and documentation to English
check / check-without-hardware (push) Successful in 6m45s

- README, CHANGELOG, RELEASE_NOTES, THIRD_PARTY_NOTICES and docs/*.md
  translated to English; cross-markdown anchors updated
- C/C++/Python/shell comments and user-facing messages translated
- identifiers, protocol names, commands and literals unchanged
- native tests re-verified: 24/24 PASS; tpms_frame.py self-test PASS
This commit is contained in:
czcionka committed 2026-10-30 18:01:32 +00:00
1 parent 1563e34d05
commit e183d23950
42 files changed
+1106 -1019

No files matched your search

+5 -5
View File
@@ -22,7 +22,7 @@ static void test_normal_clone_ids_sends_four_wheels_and_repeats(void)
{
settings_t cfg;
settings_defaults(&cfg);
cfg.wheels[0].id = 0x111111u; /* Clone IDs: konfiguracja bez nauki. */
cfg.wheels[0].id = 0x111111u; /* Clone IDs: configuration without LEARN. */
FakeRadio radio;
AppState app(&cfg, &radio);
app.begin(0u);
@@ -48,7 +48,7 @@ static void test_new_ids_learn_order_force_and_finish(void)
TEST_ASSERT_EQUAL(AppMode::LEARN, app.mode());
TEST_ASSERT_EQUAL_UINT8(1u, radio.count);
TEST_ASSERT_EQUAL_UINT8(WHEEL_FL, radio.wheels[0]);
TEST_ASSERT_TRUE(app.send_current()); /* wymuszenie bez zmiany kola */
TEST_ASSERT_TRUE(app.send_current()); /* force TX without changing wheel */
TEST_ASSERT_EQUAL_UINT8(2u, radio.count);
app.short_press(100u);
TEST_ASSERT_EQUAL_UINT8(WHEEL_FR, app.active_wheel());
@@ -77,7 +77,7 @@ static void test_learn_period_window_and_total_timeout(void)
TEST_ASSERT_EQUAL(AppMode::LEARN, app.mode());
app.tick(60000u, false);
TEST_ASSERT_EQUAL(AppMode::NORMAL, app.mode());
TEST_ASSERT_EQUAL_UINT8(3u, radio.count); /* timeout nie nadaje nowej ramki */
TEST_ASSERT_EQUAL_UINT8(3u, radio.count); /* timeout sends no new frame */
app.set_mode(AppMode::LEARN, WHEEL_FL, 100000u);
app.tick(1000000u, false);
@@ -118,7 +118,7 @@ static void test_button_gestures(void)
app.very_long_press(30u);
TEST_ASSERT_EQUAL(AppMode::NORMAL, app.mode());
app.short_press(40u);
TEST_ASSERT_EQUAL_UINT8(6u, radio.count); /* LEARN + SINGLE + 4 koła NORMAL */
TEST_ASSERT_EQUAL_UINT8(6u, radio.count); /* LEARN + SINGLE + 4 wheels NORMAL */
}
static void test_acc_intervals_without_permanent_shutdown(void)
@@ -179,7 +179,7 @@ static void test_millis_wrap_does_not_stall_learn(void)
FakeRadio radio;
AppState app(&cfg, &radio);
app.set_mode(AppMode::LEARN, WHEEL_FL, UINT32_MAX - 1000u);
app.tick(1000u, false); /* uplynely 2001 ms po zawinieciu */
app.tick(1000u, false); /* 2001 ms elapsed after the wrap */
TEST_ASSERT_EQUAL_UINT8(2u, radio.count);
}
+2 -2
View File
@@ -47,8 +47,8 @@ static void test_float_ranges(void)
static void test_float_rejects_nan_and_infinity(void)
{
/* Regresja: NaN przechodzil stary test zakresu (obie strony falszywe),
* trafial do NVS jako cisnienie i blokowal zapis czestotliwosci RF. */
/* Regression: NaN passed the old range test (both comparisons false),
* ended up in NVS as pressure and blocked later RF frequency saves. */
float value = 0.0f;
TEST_ASSERT_FALSE(parse_float("nan", 0.0f, 637.5f, &value));
TEST_ASSERT_FALSE(parse_float("-nan", 0.0f, 637.5f, &value));
+12 -11
View File
@@ -14,8 +14,8 @@ struct capture_vector_t {
static void test_four_independent_capture_payloads(void)
{
/* rtl_433_tests commit 1aa8c29, cztery nagrania, po 16 dekodowan.
* Wszystkie: flags=4c900070, pressure=0. Wartosci nie pochodza z generatora. */
/* rtl_433_tests commit 1aa8c29, four captures, 16 decodes each.
* All: flags=4c900070, pressure=0. The values do not come from a generator. */
static const capture_vector_t vectors[] = {
{0x2FC871u, 32, 90u, 0x0Eu},
{0x2EAAF9u, 32, 90u, 0x77u},
@@ -36,8 +36,9 @@ static void test_four_independent_capture_payloads(void)
static void test_known_frame_and_pressure_temperature(void)
{
/* Wektor zregenerowany po kalibracji pola P wg auta (260 kPa -> P=95);
* rownolegle do tools/tpms_frame.py. Sam kod Manchester bez zmian. */
/* Vector regenerated after calibrating the P field against the car
* (260 kPa -> P=95); parallel to tools/tpms_frame.py. Manchester bit
* coding itself is unchanged. */
static const uint8_t expected[TPMS_TX_BYTES] = {
0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,
0xCB,0x4B,0x2C,0xAA,0xAA,0xAA,0xD4,0xAA,0xB3,0x55,
@@ -48,7 +49,7 @@ static void test_known_frame_and_pressure_temperature(void)
TEST_ASSERT_TRUE(tpms_build_frame(frame, 0x2FC871u, 2600u, 23, 0x4C900070u));
TEST_ASSERT_EQUAL_UINT8_ARRAY(expected, frame, TPMS_TX_BYTES);
TEST_ASSERT_TRUE(tpms_build_payload(payload, 0x123456u, 2600u, 23, 0x4C900070u));
TEST_ASSERT_EQUAL_HEX8(0x5F, payload[7]); /* 260 kPa -> 95 (2,73 kPa/bit) */
TEST_ASSERT_EQUAL_HEX8(0x5F, payload[7]); /* 260 kPa -> 95 (2.73 kPa/bit) */
TEST_ASSERT_EQUAL_UINT8(73u, payload[8]);
TEST_ASSERT_EQUAL_HEX8(0x90, payload[9]);
}
@@ -91,14 +92,14 @@ static void test_manchester_polarity_and_negative_frames(void)
uint8_t damaged[TPMS_TX_BYTES];
memcpy(damaged, frame, sizeof(frame));
damaged[10] &= 0x3Fu; /* dwa jednakowe chipy: niedozwolony Manchester */
damaged[10] &= 0x3Fu; /* two identical chips: invalid Manchester */
TEST_ASSERT_FALSE(decode_strict(damaged, sizeof(damaged), payload));
TEST_ASSERT_FALSE(decode_strict(frame, sizeof(frame) - 1u, payload));
memcpy(damaged, frame, sizeof(frame));
/* Odwroc cala komorke Manchester (oba chipy) w bicie sumy kontrolnej:
* ramka pozostaje poprawnym Manchesterem, ale suma przestaje sie zgadzac,
* wiec odrzucenie nastepuje wlasnie na etapie checksum. */
/* Invert the whole Manchester cell (both chips) of the checksum bit:
* the frame remains a valid Manchester bitstream, but the sum stops
* matching, so rejection happens exactly at the checksum stage. */
damaged[28] ^= 0x60u;
TEST_ASSERT_FALSE(decode_strict(damaged, sizeof(damaged), payload));
}
@@ -108,11 +109,11 @@ static void test_rounding_and_saturation(void)
uint8_t p[TPMS_PAYLOAD_LEN];
TEST_ASSERT_TRUE(tpms_build_payload(p, 1u, 12u, 0, 0u)); /* 1.2 kPa */
TEST_ASSERT_EQUAL_UINT8(0u, p[7]);
TEST_ASSERT_TRUE(tpms_build_payload(p, 1u, 13u, 0, 0u)); /* prog 13.7 */
TEST_ASSERT_TRUE(tpms_build_payload(p, 1u, 13u, 0, 0u)); /* threshold 13.7 */
TEST_ASSERT_EQUAL_UINT8(0u, p[7]);
TEST_ASSERT_TRUE(tpms_build_payload(p, 1u, 14u, 0, 0u));
TEST_ASSERT_EQUAL_UINT8(1u, p[7]);
TEST_ASSERT_TRUE(tpms_build_payload(p, 1u, 2608u, -40, 0u)); /* prog 2607.2 */
TEST_ASSERT_TRUE(tpms_build_payload(p, 1u, 2608u, -40, 0u)); /* threshold 2607.2 */
TEST_ASSERT_EQUAL_UINT8(96u, p[7]);
TEST_ASSERT_EQUAL_UINT8(0u, p[8]);
TEST_ASSERT_TRUE(tpms_build_payload(p, 1u, 2607u, 85, 0u));