AP_WindVane: add wind_speed_enabled method

This commit is contained in:
Peter Hall 2019-05-27 18:17:36 +01:00 committed by Randy Mackay
parent 27286b659b
commit 3dd0ebaf0d
2 changed files with 9 additions and 0 deletions

View File

@ -179,6 +179,12 @@ bool AP_WindVane::enabled() const
return _direction_type != WINDVANE_NONE;
}
// return true if wind speed is enabled
bool AP_WindVane::wind_speed_enabled() const
{
return (_speed_sensor_type != WINDSPEED_NONE);
}
// Initialize the Wind Vane object and prepare it for use
void AP_WindVane::init(const AP_SerialManager& serial_manager)
{

View File

@ -43,6 +43,9 @@ public:
// return true if wind vane is enabled
bool enabled() const;
// return true if wind speed is enabled
bool wind_speed_enabled() const;
// Initialize the Wind Vane object and prepare it for use
void init(const AP_SerialManager& serial_manager);