mirror of https://github.com/ArduPilot/ardupilot
AP_WindVane: use strtof instead of atof
we don't need double precision
This commit is contained in:
parent
c7fce7568e
commit
1ec921560e
|
@ -153,7 +153,7 @@ bool AP_WindVane_NMEA::decode_latest_term()
|
||||||
|
|
||||||
switch (_term_number) {
|
switch (_term_number) {
|
||||||
case 1:
|
case 1:
|
||||||
_wind_dir_deg = atof(_term);
|
_wind_dir_deg = strtof(_term, NULL);
|
||||||
// check for sensible value
|
// check for sensible value
|
||||||
if (is_negative(_wind_dir_deg) || _wind_dir_deg > 360.0f) {
|
if (is_negative(_wind_dir_deg) || _wind_dir_deg > 360.0f) {
|
||||||
_sentence_valid = false;
|
_sentence_valid = false;
|
||||||
|
@ -169,7 +169,7 @@ bool AP_WindVane_NMEA::decode_latest_term()
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
_speed_ms = atof(_term);
|
_speed_ms = strtof(_term, NULL);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 4:
|
case 4:
|
||||||
|
|
Loading…
Reference in New Issue