#!/usr/bin/env ruby
require_relative 'tello.rb'
t = Tello.new
Signal.trap(:INT){
STDERR.puts "緊急着陸します。"
t.send_command("land")
sleep 3
exit 1
}
t.send_command("command")
print"Enterで離陸:"; gets
t.send_command("takeoff")
print"Enterで45度:"; gets
t.send_command("ccw 45")
print"Enterで前に150移動:"; gets
t.send_command("forward 150cm")
print"Enterで45度:";gets
t.send_command("cw 45")
print"Enterで前に150移動:"; gets
t.send_command("forward 150cm")
print"Enterで着陸:"; gets
t.send_command("land")
t.close
#### ここまでの間に命令を入れてゴールにたどり着けるようにしよう!!
t.send_command("land")