From 602fbc0421613dcf844e437f4e0e7bfb783f393a Mon Sep 17 00:00:00 2001 From: rct Date: Thu, 24 May 2018 18:05:13 -0400 Subject: [PATCH] Acurite cosmetics fixes Some cosmetic fixes pointed out by GDT - missed battery low change in verbose field. - Note: since sensor_id isn't outputting hex as intended: - 5-n-1: change to int in order to keep it stable. - tower: id and sensor_id are currently redundant, left sensor_id as "hex" for now as a test case. --- src/devices/acurite.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/devices/acurite.c b/src/devices/acurite.c index 9045375c..77981e76 100644 --- a/src/devices/acurite.c +++ b/src/devices/acurite.c @@ -376,7 +376,7 @@ static float acurite_6045_getTemp (uint8_t highbyte, uint8_t lowbyte) { * * C = Channel * I = ID - * B = Battery + Mesage type 0x2f + * B = Battery + Message type 0x2f * S = Status/Message type/Temperature MSB. * T = Temperature * D = Lightning distance and status bits? @@ -645,11 +645,11 @@ static int acurite_txr_callback(bitbuffer_t *bitbuf) { "time", "", DATA_STRING, time_str, "model", "", DATA_STRING, "Acurite tower sensor", "id", "", DATA_INT, sensor_id, - "sensor_id", NULL, DATA_FORMAT, "0x%02X", DATA_INT, sensor_id, + "sensor_id", NULL, DATA_FORMAT, "0x%04x", DATA_INT, sensor_id, // @todo hex output not working, delete at 1.0 release "channel", NULL, DATA_STRING, &channel_str, "temperature_C", "Temperature", DATA_FORMAT, "%.1f C", DATA_DOUBLE, tempc, "humidity", "Humidity", DATA_INT, humidity, - "battery_low", "battery", DATA_INT, battery_low, + "battery_low", "battery low", DATA_INT, battery_low, NULL); @@ -696,7 +696,7 @@ static int acurite_txr_callback(bitbuffer_t *bitbuf) { data = data_make( "time", "", DATA_STRING, time_str, "model", "", DATA_STRING, "Acurite 5n1 sensor", - "sensor_id", NULL, DATA_FORMAT, "0x%02X", DATA_INT, sensor_id, + "sensor_id", NULL, DATA_INT, sensor_id, // @todo normaiize to "id" at 1.0 release. "channel", NULL, DATA_STRING, &channel_str, "sequence_num", NULL, DATA_INT, sequence_num, "battery", NULL, DATA_STRING, battery_low ? "OK" : "LOW", @@ -721,7 +721,7 @@ static int acurite_txr_callback(bitbuffer_t *bitbuf) { data = data_make( "time", "", DATA_STRING, time_str, "model", "", DATA_STRING, "Acurite 5n1 sensor", - "sensor_id", NULL, DATA_FORMAT, "0x%02X", DATA_INT, sensor_id, + "sensor_id", NULL, DATA_INT, sensor_id, // @todo normalize to "id" at 1.0 release. "channel", NULL, DATA_STRING, &channel_str, "sequence_num", NULL, DATA_INT, sequence_num, "battery", NULL, DATA_STRING, battery_low ? "OK" : "LOW",