From: Roman Bazalevsky Date: Sun, 22 Feb 2015 09:54:51 +0000 (+0300) Subject: Acurite 5in1 minor fixes X-Git-Url: https://git.rvb.name/rtl-433.git/commitdiff_plain/ca13278b24eb61443559bcb61e64627fba3d8823?ds=sidebyside;hp=f3e4470f3834d2e10d66669bd149e8e3fffcd765 Acurite 5in1 minor fixes --- 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; }