Module: DjiMqttConnect::Mixins::EmergencyStopState
- Defined in:
- lib/dji_mqtt_connect/mixins/emergency_stop_state.rb
Instance Method Summary collapse
Instance Method Details
#humanized_emergency_stop_state ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/dji_mqtt_connect/mixins/emergency_stop_state.rb', line 6 def humanized_emergency_stop_state return unless emergency_stop_state state_key = case emergency_stop_state when Types::EMERGENCY_STOP_STATE_CLOSED "Closed" when Types::EMERGENCY_STOP_STATE_OPEN "Open" end I18n.t(state_key.downcase, scope: "dji_mqtt_connect.dock_emergency_stop_state", default: state_key) end |