docs: Fix LaCrosse-IT doc comment

This commit is contained in:
Christian W. Zuckschwerdt 2020-04-30 17:32:13 +02:00
parent 19b2f593d2
commit 27f9922caa
5 changed files with 43 additions and 51 deletions

View file

@ -11,7 +11,7 @@
*/
/**
Largely the same as kedsum, s3318p.
\sa kedsum.c s3318p.c
@sa kedsum.c s3318p.c
Frame structure:

View file

@ -1,7 +1,7 @@
/** @file
Fine Offset WH1080/WH3080 Weather Station
*/
/** \fn int fineoffset_wh1080_callback(r_device *decoder, bitbuffer_t *bitbuffer)
/** @fn int fineoffset_wh1080_callback(r_device *decoder, bitbuffer_t *bitbuffer)
This module is based on Stanisław Pitucha ('viraptor' https://github.com/viraptor) code stub for the Digitech XC0348
Weather Station, which seems to be a rebranded Fine Offset WH1080 Weather Station.

View file

@ -13,7 +13,7 @@
*/
/**
Largely the same as esperanza_ews, s3318p.
\sa esperanza_ews.c s3318p.c
@sa esperanza_ews.c s3318p.c
Frame structure:

View file

@ -12,33 +12,32 @@ Tune to 868240000Hz
Protocol
========
Example data : https://github.com/merbanan/rtl_433_tests/tree/master/tests/lacrosse/06/gfile-tx29.cu8
~~~
a a 2 d d 4 9 2 8 4 4 8 6 a e c
Bits :
1010 1010 0010 1101 1101 0100 1001 0010 1000 0100 0100 1000 0110 1010 1110 1100
Bytes num :
----1---- ----2---- ----3---- ----4---- ----5---- ----6---- ----7---- ----8----
~~~~~~~~~ 1st byte
preamble, sequence 10B repeated 4 times (see below)
~~~~~~~~~~~~~~~~~~~ bytes 2 and 3
brand identifier, always 0x2dd4
~~~~ 1st nibble of bytes 4
datalength (always 9) in nibble, including this field and crc
~~~~ ~~ 2nd nibble of bytes 4 and 1st and 2nd bits of byte 5
Random device id (6 bits)
~ 3rd bits of byte 5
new battery indicator
~ 4th bits of byte 5
unknown, unused
~~~~ ~~~~ ~~~~ 2nd nibble of byte 5 and byte 6
temperature, in bcd *10 +40
~ 1st bit of byte 7
weak battery
~~~ ~~~~ 2-8 bits of byte 7
humidity, in%. If == 0x6a : no humidity sensor
~~~~ ~~~~ byte 8
crc8 of bytes
~~~
a a 2 d d 4 9 2 8 4 4 8 6 a e c
Bits :
1010 1010 0010 1101 1101 0100 1001 0010 1000 0100 0100 1000 0110 1010 1110 1100
Bytes num :
----1---- ----2---- ----3---- ----4---- ----5---- ----6---- ----7---- ----8----
~~~~~~~~~ 1st byte
preamble, sequence 10B repeated 4 times (see below)
~~~~~~~~~~~~~~~~~~~ bytes 2 and 3
brand identifier, always 0x2dd4
~~~~ 1st nibble of bytes 4
datalength (always 9) in nibble, including this field and crc
~~~~ ~~ 2nd nibble of bytes 4 and 1st and 2nd bits of byte 5
Random device id (6 bits)
~ 3rd bits of byte 5
new battery indicator
~ 4th bits of byte 5
unknown, unused
~~~~ ~~~~ ~~~~ 2nd nibble of byte 5 and byte 6
temperature, in bcd *10 +40
~ 1st bit of byte 7
weak battery
~~~ ~~~~ 2-8 bits of byte 7
humidity, in%. If == 0x6a : no humidity sensor
~~~~ ~~~~ byte 8
crc8 of bytes
Developer's comments
====================
@ -47,16 +46,12 @@ It seems some sensor send a long preamble (33 bits, 0 / 1 alternated), and some
six bits as the preamble. I own 3 sensors TX29, and two of them send a long preamble.
So this decoder synchronize on the following sequence:
---------------------------------------------
1010 1000 1011 0111 0101 0010 01--
A 8 B 7 5 2 4
1010 1000 1011 0111 0101 0010 01--
A 8 B 7 5 2 4
0 - 5 : short preabmle [101010B]
6 - 14 : brand identifier [2DD4h]
15 - 19 : datalength [9]
---------------------------------------------
- 0 - 5 : short preabmle [101010B]
- 6 - 14 : brand identifier [2DD4h]
- 15 - 19 : datalength [9]
Short preamble example (sampling rate - 1Mhz):
https://github.com/merbanan/rtl_433_tests/tree/master/tests/lacrosse/06/gfile-tx29-short-preamble.cu8.
@ -102,9 +97,7 @@ static int lacrosse_it(r_device *decoder, bitbuffer_t *bitbuffer, int device29or
// remove preamble and keep only five octets
bitbuffer_extract_bytes(bitbuffer, brow, start_pos+22, out, 40);
/*
* Check message integrity (CRC/Checksum/parity)
*/
// Check message integrity (CRC/Checksum/parity)
r_crc = out[4];
c_crc = crc8(&out[0], 4, LACROSSE_TX35_CRC_POLY, LACROSSE_TX35_CRC_INIT);
if (r_crc != c_crc) {
@ -114,10 +107,7 @@ static int lacrosse_it(r_device *decoder, bitbuffer_t *bitbuffer, int device29or
continue; // DECODE_FAIL_MIC
}
/*
* Now that message "envelope" has been validated,
* start parsing data.
*/
// message "envelope" has been validated, start parsing data
sensor_id = ((out[0] & 0x0f) << 2) | (out[1] >> 6);
temp_c = 10.0 * (out[1] & 0x0f) + 1.0 * ((out[2] >> 4) & 0x0f) + 0.1 * (out[2] & 0x0f) - 40.0;
newbatt = (out[1] >> 5) & 1;
@ -153,15 +143,17 @@ static int lacrosse_it(r_device *decoder, bitbuffer_t *bitbuffer, int device29or
}
/**
** Wrapper for the TX29 device
**/
Wrapper for the TX29 device.
@sa lacrosse_it()
*/
static int lacrossetx29_callback(r_device *decoder, bitbuffer_t *bitbuffer) {
return lacrosse_it(decoder, bitbuffer, LACROSSE_TX29_MODEL);
}
/**
** Wrapper for the TX35 device
**/
Wrapper for the TX35 device.
@sa lacrosse_it()
*/
static int lacrossetx35_callback(r_device *decoder, bitbuffer_t *bitbuffer) {
return lacrosse_it(decoder, bitbuffer, LACROSSE_TX35_MODEL);
}

View file

@ -11,7 +11,7 @@
*/
/**
Largely the same as esperanza_ews, kedsum.
\sa esperanza_ews.c kedsum.c
@sa esperanza_ews.c kedsum.c
Also NC-5849-913 from Pearl (for FWS-310 station).