Class: DJI::Command::TrackCommand
- Defined in:
- lib/dji/commands/track/track_command.rb
Instance Method Summary collapse
Methods inherited from Base
command_name, inherited, namespace, perform
Instance Method Details
#track ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/dji/commands/track/track_command.rb', line 9 def track if [:repeat].present? interval = [:repeat].to_i.presence || 300 puts puts "Requesting order tracking details every #{interval} seconds. Press CONTROL-C to stop..." while true DJI::OrderTracking.tracking_details([:order_number], [:phone_tail]) sleep(interval) end else DJI::OrderTracking.tracking_details([:order_number], [:phone_tail]) end end |