Skip to content

Commit

Permalink
StopLanding feature
Browse files Browse the repository at this point in the history
  • Loading branch information
cbwang2016 authored May 22, 2018
1 parent ae755c3 commit 4918062
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions platforms/dji/tello/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,18 @@ func (d *Driver) Land() (err error) {
return
}

// StopLanding tells drone to stop landing.
func (d *Driver) StopLanding() (err error) {
buf, _ := d.createPacket(landCommand, 0x68, 1)
d.seq++
binary.Write(buf, binary.LittleEndian, d.seq)
binary.Write(buf, binary.LittleEndian, byte(0x01))
binary.Write(buf, binary.LittleEndian, CalculateCRC16(buf.Bytes()))

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

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

0 comments on commit 4918062

Please sign in to comment.