]> mj.ucw.cz Git - arexx.git/commitdiff
A couple of comments
authorMartin Mares <mj@ucw.cz>
Mon, 26 Dec 2011 20:50:03 +0000 (21:50 +0100)
committerMartin Mares <mj@ucw.cz>
Mon, 26 Dec 2011 20:50:03 +0000 (21:50 +0100)
arexx.c

diff --git a/arexx.c b/arexx.c
index 1ab341c8d663b42fe2db9bd22c6accbe545ba7d9..95c9c9389cf4c9f9b8168bc264c323fd35db94e1 100644 (file)
--- 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 "<deviceinfo>". 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);