diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2014-08-31 21:10:04 +0200 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2014-08-31 21:10:04 +0200 |
commit | af3b3680e090ad80ffeb6581f1f58f2dd4ae5195 (patch) | |
tree | c505e35b1654b8b1196ee5adb03852cc4d6cb471 /src/drivers/sf0x | |
parent | a46e1aa60efcaf8b52db02f783fc4c0a9dc05878 (diff) | |
download | px4-firmware-af3b3680e090ad80ffeb6581f1f58f2dd4ae5195.tar.gz px4-firmware-af3b3680e090ad80ffeb6581f1f58f2dd4ae5195.tar.bz2 px4-firmware-af3b3680e090ad80ffeb6581f1f58f2dd4ae5195.zip |
Fixed SF02/F driver, tested ok
Diffstat (limited to 'src/drivers/sf0x')
-rw-r--r-- | src/drivers/sf0x/sf0x.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/drivers/sf0x/sf0x.cpp b/src/drivers/sf0x/sf0x.cpp index b690938e7..d382d08d0 100644 --- a/src/drivers/sf0x/sf0x.cpp +++ b/src/drivers/sf0x/sf0x.cpp @@ -606,7 +606,7 @@ SF0X::collect() si_units = strtod(_linebuf, &end); /* we require at least four characters for a valid number */ - if (end > _linebuf + 4) { + if (end > _linebuf + 3) { valid = true; } else { si_units = -1.0f; @@ -615,7 +615,7 @@ SF0X::collect() } } - debug("val (float): %8.4f, raw: %s, valid: %s\n", (double)si_units, _linebuf, ((valid) ? "OK" : "NO")); + debug("val (float): %8.4f, raw: %s, valid: %s", (double)si_units, _linebuf, ((valid) ? "OK" : "NO")); /* done with this chunk, resetting - even if invalid */ _linebuf_index = 0; |