From b6f05f8667bb577eadb01dc291ec5fb3002c0ffb Mon Sep 17 00:00:00 2001 From: "Christian W. Zuckschwerdt" Date: Tue, 16 Oct 2018 20:16:34 +0200 Subject: [PATCH] Remove macros to clear up name/model --- src/devices/thermopro_tp11.c | 6 ++---- src/devices/thermopro_tp12.c | 4 +--- src/devices/wssensor.c | 6 ++---- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/src/devices/thermopro_tp11.c b/src/devices/thermopro_tp11.c index fafee9e6..82266290 100644 --- a/src/devices/thermopro_tp11.c +++ b/src/devices/thermopro_tp11.c @@ -11,8 +11,6 @@ #include "rtl_433.h" #include "util.h" -#define MODEL "Thermopro TP11 Thermometer" - /* normal sequence of bit rows: [00] {33} db 41 57 c2 80 : 11011011 01000001 01010111 11000010 1 [01] {33} db 41 57 c2 80 : 11011011 01000001 01010111 11000010 1 @@ -73,7 +71,7 @@ static int thermopro_tp11_sensor_callback(bitbuffer_t *bitbuffer) { local_time_str(0, time_str); data = data_make("time", "", DATA_STRING, time_str, - "model", "", DATA_STRING, MODEL, + "model", "", DATA_STRING, "Thermopro TP11 Thermometer", "id", "Id", DATA_FORMAT, "\t %d", DATA_INT, device, "temperature_C", "Temperature", DATA_FORMAT, "%.01f C", DATA_DOUBLE, fTemp, NULL); @@ -90,7 +88,7 @@ static char *output_fields[] = { }; r_device thermopro_tp11 = { - .name = MODEL, + .name = "Thermopro TP11 Thermometer", .modulation = OOK_PULSE_PPM_RAW, .short_limit = 956, .long_limit = 1912, diff --git a/src/devices/thermopro_tp12.c b/src/devices/thermopro_tp12.c index ca97301b..5c5a092b 100644 --- a/src/devices/thermopro_tp12.c +++ b/src/devices/thermopro_tp12.c @@ -11,8 +11,6 @@ #include "rtl_433.h" #include "util.h" -#define MODEL "Thermopro TP12 Thermometer" - /* A normal sequence for the TP12: @@ -99,7 +97,7 @@ static int thermopro_tp12_sensor_callback(bitbuffer_t *bitbuffer) { local_time_str(0, time_str); data = data_make("time", "", DATA_STRING, time_str, - "model", "", DATA_STRING, MODEL, + "model", "", DATA_STRING, "Thermopro TP12 Thermometer", "id", "Id", DATA_FORMAT, "\t %d", DATA_INT, device, "temperature_1_C", "Temperature 1 (Food)", DATA_FORMAT, "%.01f C", DATA_DOUBLE, fTemp1, "temperature_2_C", "Temperature 2 (Barbecue)", DATA_FORMAT, "%.01f C", DATA_DOUBLE, fTemp2, diff --git a/src/devices/wssensor.c b/src/devices/wssensor.c index a847eb3c..db5a5d39 100644 --- a/src/devices/wssensor.c +++ b/src/devices/wssensor.c @@ -25,7 +25,6 @@ #include "data.h" #include "util.h" -#define MODEL "WS Temperature Sensor" #define WS_PACKETLEN 24 #define WS_MINREPEATS 4 #define WS_REPEATS 23 @@ -73,7 +72,7 @@ static int wssensor_callback(bitbuffer_t *bitbuffer) { local_time_str(0, time_str); data = data_make("time", "", DATA_STRING, time_str, - "model", "", DATA_STRING, MODEL, + "model", "", DATA_STRING, "WS Temperature Sensor", "id", "House Code", DATA_INT, sensor_id, "channel", "Channel", DATA_INT, channel, "battery", "Battery", DATA_STRING, battery_status ? "OK" : "LOW", @@ -95,7 +94,7 @@ static char *output_fields[] = { }; r_device wssensor = { - .name = MODEL, + .name = "WS Temperature Sensor", .modulation = OOK_PULSE_PPM_RAW, .short_limit = 1400, .long_limit = 2400, @@ -105,4 +104,3 @@ r_device wssensor = { .demod_arg = 0, .fields = output_fields }; -