Protokol: kalibracja pola cisnienia P wg wyswietlacza auta (2,73 kPa/bit)
check / check-without-hardware (push) Failing after 8m35s
check / check-without-hardware (push) Failing after 8m35s
This commit is contained in:
1 parent
9f48c13b05
commit
f50d5a365e
9 files changed
+87
-16
No files matched your search
+2
-1
@@ -26,7 +26,8 @@ bool tpms_build_payload(uint8_t out[TPMS_PAYLOAD_LEN], uint32_t id,
|
||||
return false;
|
||||
}
|
||||
|
||||
int32_t pressure = ((int32_t)press_kpa10 + 12) / 25;
|
||||
int32_t pressure = ((int32_t)press_kpa10 * 10 + TPMS_PRESSURE_KPA100_PER_RAW / 2)
|
||||
/ TPMS_PRESSURE_KPA100_PER_RAW;
|
||||
if (pressure > 255) {
|
||||
pressure = 255;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,14 @@ extern "C" {
|
||||
#define TPMS_TX_BYTES 30
|
||||
#define TPMS_TX_CHIPS (TPMS_TX_BYTES * 8)
|
||||
|
||||
/* Kalibracja pola P: tyle setnych kPa przypada na jeden bit bajtu P.
|
||||
* Skala rtl_433 (250 = 2,5 kPa/bit) nie jest potwierdzona nagraniami
|
||||
* (wszystkie maja P=0), a pomiar z auta: 260 kPa -> 284 kPa na wyswietlaczu
|
||||
* przy P=104, wiec korekta skalujaca 2,73 kPa/bit daje P=95 dla 260 kPa.
|
||||
* Do strojenia po feedbacku z auta (docs/AUDIT.md) - zmienic tez
|
||||
* PRESSURE_KPA100_PER_RAW w tools/tpms_frame.py. */
|
||||
#define TPMS_PRESSURE_KPA100_PER_RAW 273
|
||||
|
||||
#ifdef __cplusplus
|
||||
static_assert(TPMS_TX_CHIPS == 1 + 2 * (TPMS_ROW_BITS - 1) + 1,
|
||||
"Nieprawidlowa dlugosc bufora Manchester");
|
||||
|
||||
Reference in new issue
Block a user