diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2014-08-23 13:19:37 +0200 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2014-08-23 13:19:37 +0200 |
commit | 1143cdbadfdf5a00765373cfa2ad84f6d23f2c51 (patch) | |
tree | 92775315b732b88ed097188edc2c26599c5133ee /src/drivers/sf0x/sf0x.cpp | |
parent | 2c0d192944744086905e622f445a523d6650cdc5 (diff) | |
parent | edffb2eede777f3c316bc8a144984d9d12cbd680 (diff) | |
download | px4-firmware-1143cdbadfdf5a00765373cfa2ad84f6d23f2c51.tar.gz px4-firmware-1143cdbadfdf5a00765373cfa2ad84f6d23f2c51.tar.bz2 px4-firmware-1143cdbadfdf5a00765373cfa2ad84f6d23f2c51.zip |
Merge branch 'master' of github.com:PX4/Firmware into ekf_varweight
Diffstat (limited to 'src/drivers/sf0x/sf0x.cpp')
-rw-r--r-- | src/drivers/sf0x/sf0x.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/drivers/sf0x/sf0x.cpp b/src/drivers/sf0x/sf0x.cpp index bca1715fa..80ecab2ee 100644 --- a/src/drivers/sf0x/sf0x.cpp +++ b/src/drivers/sf0x/sf0x.cpp @@ -598,7 +598,8 @@ SF0X::collect() memcpy(_linebuf, buf, (lend + 1) - (i + 1)); } - if (_linebuf[i] == '.') { + /* we need a digit before the dot and a dot for a valid number */ + if (i > 0 && _linebuf[i] == '.') { valid = true; } } |