add support for TP08 remote thermometer (#750)

This commit is contained in:
Jonathan Terhorst
2018-09-06 10:09:30 -04:00
committed by Christian W. Zuckschwerdt
parent 98e2c84c82
commit 36faebfb78

View File

@@ -56,7 +56,12 @@ static int thermopro_tp12_sensor_callback(bitbuffer_t *bitbuffer) {
// The device transmits 16 rows, let's check for 3 matching.
// (Really 17 rows, but the last one doesn't match because it's missing a trailing 1.)
good = bitbuffer_find_repeated_row(bitbuffer, 5, 40);
// Update for TP08: same is true but only 2 rows.
good = bitbuffer_find_repeated_row(
bitbuffer,
(bitbuffer->num_rows > 5) ? 5 : 2,
40
);
if (good < 0) {
return 0;
}
@@ -134,7 +139,7 @@ Those gaps are suspiciously close to 500 us and 1500 us.
*/
r_device thermopro_tp12 = {
.name = MODEL,
.name = "Thermopro TP08/TP12 thermometer",
.modulation = OOK_PULSE_PPM_RAW,
// note that these are in microseconds, not samples.
.short_limit = 1000,