Module: DjiMqttConnect::Mixins::WindDirection

Defined in:
lib/dji_mqtt_connect/mixins/wind_direction.rb

Overview

Provides a conditional that returns false for wind directions that are not one of the compass points DJI documents. A drone reports 0 when it has no reading, and one that is not connected has been seen reporting 256 alongside its other placeholders

Instance Method Summary collapse

Instance Method Details

#wind_direction?Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/dji_mqtt_connect/mixins/wind_direction.rb', line 9

def wind_direction?
  Types::WindDirection.valid?(wind_direction)
end