Class: DjiMqttConnect::Thing::Product::FlighttaskProgressEventsMessage

Inherits:
EventsMessage
  • Object
show all
Defined in:
lib/dji_mqtt_connect/messages/thing/product/events/flighttask_progress.rb

Overview

Instance Method Summary collapse

Methods inherited from EventsMessage

#need_reply?, #to_s

Methods inherited from Message

current_timestamp, generate_bid, generate_tid, #to_s

Instance Method Details

#flight_idsObject

All the flight IDs in the message



116
117
118
# File 'lib/dji_mqtt_connect/messages/thing/product/events/flighttask_progress.rb', line 116

def flight_ids
  [data.output.ext.flight_id]
end

#humanized_summaryObject



95
96
97
98
99
100
101
102
# File 'lib/dji_mqtt_connect/messages/thing/product/events/flighttask_progress.rb', line 95

def humanized_summary
  return super unless data.output.ext.break_point

  Translations.thing_product_events_summary(
    "#{_method}_with_break_point",
    **humanized_summary_interpolation
  )
end

#humanized_summary_interpolationObject



104
105
106
107
108
109
110
111
112
113
# File 'lib/dji_mqtt_connect/messages/thing/product/events/flighttask_progress.rb', line 104

def humanized_summary_interpolation
  super.merge(
    status: data.output.humanized_status,
    percent: data.output.progress.percent,
    current_step: data.output.progress.humanized_current_step,
    wayline_mission_state: data.output.ext.humanized_wayline_mission_state || "-",
    flight_id: data.output.ext.flight_id,
    break_reason: data.output.ext.break_point&.humanized_break_reason || "-"
  )
end