AP_RangeFinder: LightwareSerial uses nullptr for strtof
This commit is contained in:
parent
85c4db6896
commit
429e70fb94
@ -43,7 +43,7 @@ bool AP_RangeFinder_LightWareSerial::get_reading(uint16_t &reading_cm)
|
||||
if (protocol_state == ProtocolState::UNKNOWN || protocol_state == ProtocolState::LEGACY) {
|
||||
if (c == '\r') {
|
||||
linebuf[linebuf_len] = 0;
|
||||
const float dist = strtof(linebuf, NULL);
|
||||
const float dist = strtof(linebuf, nullptr);
|
||||
if (!is_negative(dist)) {
|
||||
sum += dist;
|
||||
valid_count++;
|
||||
|
Loading…
Reference in New Issue
Block a user