AP_WindVane: use strtof instead of atof

we don't need double precision
This commit is contained in:
Andrew Tridgell 2019-10-27 22:51:45 +11:00
parent c7fce7568e
commit 1ec921560e
1 changed files with 2 additions and 2 deletions

View File

@ -153,7 +153,7 @@ bool AP_WindVane_NMEA::decode_latest_term()
switch (_term_number) {
case 1:
_wind_dir_deg = atof(_term);
_wind_dir_deg = strtof(_term, NULL);
// check for sensible value
if (is_negative(_wind_dir_deg) || _wind_dir_deg > 360.0f) {
_sentence_valid = false;
@ -169,7 +169,7 @@ bool AP_WindVane_NMEA::decode_latest_term()
break;
case 3:
_speed_ms = atof(_term);
_speed_ms = strtof(_term, NULL);
break;
case 4: