mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-14 09:10:35 +08:00
Merge pull request #1290 from PX4/sf_fix
Require a digit ahead of the dot for a valid number for the SF0x output
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user