Skip to content

Commit

Permalink
Merge pull request hybridgroup#591 from trevrosen/add-hover-to-tello
Browse files Browse the repository at this point in the history
  • Loading branch information
trevrosen authored Aug 14, 2018
2 parents 605e6e2 + 96afbcf commit 8ead4aa
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions platforms/dji/tello/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,24 @@ func (d *Driver) CounterClockwise(val int) error {
return nil
}

// Hover tells the drone to stop moving on the X, Y, and Z axes and stay in place
func (d *Driver) Hover() {
d.cmdMutex.Lock()
defer d.cmdMutex.Unlock()

d.rx = float32(0)
d.ry = float32(0)
d.ly = float32(0)
}

// CeaseRotation stops any rotational motion
func (d *Driver) CeaseRotation() {
d.cmdMutex.Lock()
defer d.cmdMutex.Unlock()

d.lx = float32(0)
}

// Bounce tells drone to start/stop performing the bouncing action
func (d *Driver) Bounce() (err error) {
buf, _ := d.createPacket(bounceCommand, 0x68, 1)
Expand Down

0 comments on commit 8ead4aa

Please sign in to comment.