projects
/
rtl-433.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f3e4470
)
Acurite 5in1 minor fixes
author
Roman Bazalevsky
<rvb@rvb.name>
Sun, 22 Feb 2015 09:54:51 +0000
(12:54 +0300)
committer
Roman Bazalevsky
<rvb@rvb.name>
Sun, 22 Feb 2015 09:54:51 +0000
(12:54 +0300)
src/devices/acurite.c
patch
|
blob
|
history
diff --git
a/src/devices/acurite.c
b/src/devices/acurite.c
index 1a00324ce6b5fa885c3c4ceb3770064a2f687393..c5b50ae7a42ddcf5e212d074967ec5de25548fe1 100644
(file)
--- a/
src/devices/acurite.c
+++ b/
src/devices/acurite.c
@@
-87,7
+87,6
@@
static int acurite5n1_callback(uint8_t bb[BITBUF_ROWS][BITBUF_COLS],int16_t bits
if (buf) {
// decode packet here
if (buf) {
// decode packet here
- fprintf(stdout, "SENSOR:TYPE=ACURITE_5IN1,");
if (debug_output) {
for (i=0; i < 8; i++)
fprintf(stderr, "%02X ", buf[i]);
if (debug_output) {
for (i=0; i < 8; i++)
fprintf(stderr, "%02X ", buf[i]);
@@
-96,6
+95,7
@@
static int acurite5n1_callback(uint8_t bb[BITBUF_ROWS][BITBUF_COLS],int16_t bits
if ((buf[2] & 0x0F) == 1) {
// wind speed, wind direction, rainfall
if ((buf[2] & 0x0F) == 1) {
// wind speed, wind direction, rainfall
+ fprintf(stdout, "SENSOR:TYPE=ACURITE_5IN1,");
float rainfall = 0.00;
int raincounter = acurite_getRainfallCounter(buf[5], buf[6]);
float rainfall = 0.00;
int raincounter = acurite_getRainfallCounter(buf[5], buf[6]);
@@
-114,6
+114,7
@@
static int acurite5n1_callback(uint8_t bb[BITBUF_ROWS][BITBUF_COLS],int16_t bits
fprintf(stdout, "RAINGAUGE=%0.2f\n", rainfall);
} else if ((buf[2] & 0x0F) == 8) {
fprintf(stdout, "RAINGAUGE=%0.2f\n", rainfall);
} else if ((buf[2] & 0x0F) == 8) {
+ fprintf(stdout, "SENSOR:TYPE=ACURITE_5IN1,");
// wind speed, temp, RH
fprintf(stdout, "WINDSPEED=%d,",
acurite_getWindSpeed(buf[3], buf[4]));
// wind speed, temp, RH
fprintf(stdout, "WINDSPEED=%d,",
acurite_getWindSpeed(buf[3], buf[4]));
@@
-166,7
+167,7
@@
static int acurite_th_callback(uint8_t bb[BITBUF_ROWS][BITBUF_COLS], int16_t bit
if(buf){
fprintf(stdout, "SENSOR:TYPE=ACURITE_TEMP,");
fprintf(stdout, "TEMPERATURE=%.1f,", acurite_th_temperature(buf));
if(buf){
fprintf(stdout, "SENSOR:TYPE=ACURITE_TEMP,");
fprintf(stdout, "TEMPERATURE=%.1f,", acurite_th_temperature(buf));
- fprintf(std
err
, "HUMIDITY=%d\n", buf[3]);
+ fprintf(std
out
, "HUMIDITY=%d\n", buf[3]);
return 1;
}
return 1;
}