From ca13278b24eb61443559bcb61e64627fba3d8823 Mon Sep 17 00:00:00 2001 From: Roman Bazalevsky Date: Sun, 22 Feb 2015 12:54:51 +0300 Subject: [PATCH] Acurite 5in1 minor fixes --- src/devices/acurite.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/devices/acurite.c b/src/devices/acurite.c index 1a00324..c5b50ae 100644 --- 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 - fprintf(stdout, "SENSOR:TYPE=ACURITE_5IN1,"); 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 + fprintf(stdout, "SENSOR:TYPE=ACURITE_5IN1,"); 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, "SENSOR:TYPE=ACURITE_5IN1,"); // 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)); - fprintf(stderr, "HUMIDITY=%d\n", buf[3]); + fprintf(stdout, "HUMIDITY=%d\n", buf[3]); return 1; } -- 2.34.1