metex14: Fix 'is_ol' handling.
Thanks to Bert Vermeulen for the reminder.
This commit is contained in:
parent
2477fb9569
commit
8f46911e42
|
@ -61,10 +61,10 @@ static int parse_value(const uint8_t *buf, float *result)
|
||||||
|
|
||||||
/* Bytes 5-7: Over limit (various forms) */
|
/* Bytes 5-7: Over limit (various forms) */
|
||||||
is_ol = 0;
|
is_ol = 0;
|
||||||
is_ol += !strncmp((char *)&buf[5], ".OL", 3);
|
is_ol += (!strncmp((char *)&buf[5], ".OL", 3)) ? 1 : 0;
|
||||||
is_ol += !strncmp((char *)&buf[5], "O.L", 3);
|
is_ol += (!strncmp((char *)&buf[5], "O.L", 3)) ? 1 : 0;
|
||||||
is_ol += !strncmp((char *)&buf[5], "OL.", 3);
|
is_ol += (!strncmp((char *)&buf[5], "OL.", 3)) ? 1 : 0;
|
||||||
is_ol += !strncmp((char *)&buf[5], " OL", 3);
|
is_ol += (!strncmp((char *)&buf[5], " OL", 3)) ? 1 : 0;
|
||||||
if (is_ol != 0) {
|
if (is_ol != 0) {
|
||||||
sr_spew("Over limit.");
|
sr_spew("Over limit.");
|
||||||
*result = INFINITY;
|
*result = INFINITY;
|
||||||
|
|
Loading…
Reference in New Issue