AP_RangeFinder: LightwareSerial uses nullptr for strtof

This commit is contained in:
Randy Mackay 2020-07-01 08:54:51 +09:00
parent 85c4db6896
commit 429e70fb94

View File

@ -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++;