From bf44f0b5169eaf8ac6e5b8944932a37bf4a1244a Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Mon, 26 Dec 2011 21:50:03 +0100 Subject: [PATCH] A couple of comments --- arexx.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/arexx.c b/arexx.c index 1ab341c..95c9c93 100644 --- a/arexx.c +++ b/arexx.c @@ -140,7 +140,7 @@ static void raw_point(int t, int id, int raw, int q) * grep the blob for "". The meanings of the parameters are * as follows: * - * m1, m2 Device type matches if raw_sensor_id & m1 == m2 + * m1, m2 Device type matches if (raw_sensor_id & m1) == m2 * type Unit measured by the sensor (1=Celsius, 2=RH%, 3=CO2 ppm) * dm User-visible sensor ID = raw_sensor_id & dm * i 1 if the raw value is signed @@ -212,7 +212,7 @@ static void raw_point(int t, int id, int raw, int q) unit = "ppm"; } } else { - printf("### Unknown sensor ID 0x%04x\n", id); + printf("### Unknown sensor type 0x%04x\n", id); return; } @@ -276,6 +276,11 @@ static void set_clock(void) send_and_receive(req, reply); #if 0 + /* + * Original software also sends a packet with type 3 and the timestamp, + * but it does not make any sense, especially as they ignore the sensor + * readings in the answer. + */ req[0] = 3; send_and_receive(req, reply); parse_packet(reply); -- 2.39.2