* 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
unit = "ppm";
}
} else {
- printf("### Unknown sensor ID 0x%04x\n", id);
+ printf("### Unknown sensor type 0x%04x\n", id);
return;
}
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);