minor: Fix doc typos

This commit is contained in:
Christian W. Zuckschwerdt
2026-07-06 11:44:10 +02:00
parent 390fef5fa5
commit 1ad8c00a0b
2 changed files with 11 additions and 12 deletions

View File

@@ -29,7 +29,7 @@ Differential XOR decode (seeded from sync byte 0x94):
Data layout (nibbles):
CC CS II II II PP TT CK
CC CS II II II PP TT KK
- C: 12 bit rolling counter (p[0] + p[1] high nibble)
- S: 4 bit sensor class (p[1] low nibble)
@@ -120,12 +120,11 @@ static int tmps_gear_hive_callback(r_device *decoder, bitbuffer_t *bitbuffer)
{
uint8_t const sync_pattern[] = {0x25, 0x94}; // 16 bits
unsigned bitpos = 0;
int ret = 0;
int events = 0;
int ret = 0;
int events = 0;
for (int row = 0; row < bitbuffer->num_rows; ++row) {
bitpos = 0;
unsigned bitpos = 0;
while ((bitpos = bitbuffer_search(bitbuffer, row, bitpos, sync_pattern, 16)) + 16 + 72
<= bitbuffer->bits_per_row[row]) {
ret = tmps_gear_hive_decode(decoder, bitbuffer, row, bitpos);

View File

@@ -9,13 +9,6 @@
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
*/
/**
Nissan FSK 37 bit Manchester encoded checksummed TPMS data.
Data format:
MODE:3d TPMS_ID:24h (PSI+THREE)*FOUR=8d UNKNOWN:2b
*/
#include "decoder.h"
@@ -37,6 +30,13 @@ static uint8_t tpms_nissan_checksum(uint8_t const *b)
return ~chk & 0x03;
}
/**
Nissan FSK 37 bit Manchester encoded checksummed TPMS data.
Data format:
MODE:3d TPMS_ID:24h (PSI+THREE)*FOUR=8d UNKNOWN:2b
*/
static int tpms_nissan_decode(r_device *decoder, bitbuffer_t *bitbuffer, unsigned row, unsigned bitpos)
{
bitbuffer_t packet_bits = {0};