Skip to content

Commit

Permalink
Update driver.go
Browse files Browse the repository at this point in the history
Add Throw & Go support(Usage same as TakeOff() function)
  • Loading branch information
cbwang2016 authored May 18, 2018
1 parent 8595b01 commit 1463bf6
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions platforms/dji/tello/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,17 @@ func (d *Driver) TakeOff() (err error) {
return
}

// Throw & Go support
func (d *Driver) ThrowTakeOff() (err error) {
buf, _ := d.createPacket(0x5d, 0x48, 0)
d.seq++
binary.Write(buf, binary.LittleEndian, d.seq)
binary.Write(buf, binary.LittleEndian, CalculateCRC16(buf.Bytes()))

_, err = d.reqConn.Write(buf.Bytes())
return
}

// Land tells drone to come in for landing.
func (d *Driver) Land() (err error) {
buf, _ := d.createPacket(landCommand, 0x68, 1)
Expand Down

0 comments on commit 1463bf6

Please sign in to comment.