Commit 2780b952 authored by Michael 'PoempelFox' Meier's avatar Michael 'PoempelFox' Meier
Browse files

make debug output for lacrosse sensors more easily parseable for humans.

parent d2ec6561
......@@ -348,8 +348,17 @@ static void parseserialline(unsigned char * lastline, struct daemondata * dd) {
} else { /* battery as having 1.0 volt and everything else */
newvolt = 2.5; /* as having 2.5 volt. */
}
VERBPRINT(1, "Received data from L-sensor %u: t=%.2lf h=%.2lf v=%.2lf\n",
sid, newtemp, newhum, newvolt);
if (newhum == 106) { /* has no humidity sensor */
VERBPRINT(1, "Received data from L-sensor %u: t=%.2lf NOHUMSENS%s%s\n",
sid, newtemp,
((parsed[0] & 0x80) ? " NEWBATT" : ""),
((parsed[3] & 0x80) ? " WEAKBATT" : ""));
} else {
VERBPRINT(1, "Received data from L-sensor %u: t=%.2lf h=%.2lf%s%s\n",
sid, newtemp, newhum,
((parsed[0] & 0x80) ? " NEWBATT" : ""),
((parsed[3] & 0x80) ? " WEAKBATT" : ""));
}
} else {
return; /* Not a known/supported sensor */
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment