gobot: gobot.io/x/gobot/platforms/parrot/bebop Index | Files

package bebop

import "gobot.io/x/gobot/platforms/parrot/bebop"

Package bebop provides the Gobot adaptor and driver for the Parrot Bebop.

Installing:

go get -d -u gobot.io/x/gobot/... && go install gobot.io/x/gobot/platforms/parrot/bebop

For more information refer to the bebop README: https://github.com/hybridgroup/gobot/tree/master/platforms/parrot/bebop/README.md

Index

Package Files

bebop_adaptor.go bebop_driver.go doc.go pitch.go test_helper.go

Constants

const (
    // Flying event
    Flying = "flying"
)

func ValidatePitch Uses

func ValidatePitch(data float64, offset float64) int

ValidatePitch helps validate pitch values such as those created by a joystick to values between 0-100 that are required as params to Parrot Bebop PCMDs

type Adaptor Uses

type Adaptor struct {
    // contains filtered or unexported fields
}

Adaptor is gobot.Adaptor representation for the Bebop

func NewAdaptor Uses

func NewAdaptor() *Adaptor

NewAdaptor returns a new BebopAdaptor

func (*Adaptor) Connect Uses

func (a *Adaptor) Connect() (err error)

Connect establishes a connection to the ardrone

func (*Adaptor) Finalize Uses

func (a *Adaptor) Finalize() (err error)

Finalize terminates the connection to the ardrone

func (*Adaptor) Name Uses

func (a *Adaptor) Name() string

Name returns the Bebop Adaptors Name

func (*Adaptor) SetName Uses

func (a *Adaptor) SetName(n string)

SetName sets the Bebop Adaptors Name

type Driver Uses

type Driver struct {
    gobot.Eventer
    // contains filtered or unexported fields
}

Driver is gobot.Driver representation for the Bebop

func NewDriver Uses

func NewDriver(connection *Adaptor) *Driver

NewDriver creates an Bebop Driver.

func (*Driver) Backward Uses

func (a *Driver) Backward(speed int)

Backward causes the drone go forward, controls the pitch. speed can be a value from `0` to `100`.

func (*Driver) Clockwise Uses

func (a *Driver) Clockwise(speed int)

Clockwise causes the drone to spin in clockwise direction speed can be a value from `0` to `100`.

func (*Driver) Connection Uses

func (a *Driver) Connection() gobot.Connection

Connection returns the Bebop Drivers Connection

func (*Driver) CounterClockwise Uses

func (a *Driver) CounterClockwise(speed int)

CounterClockwise the drone to spin in counter clockwise direction speed can be a value from `0` to `100`.

func (*Driver) Down Uses

func (a *Driver) Down(speed int)

Down makes the drone reduce altitude. speed can be a value from `0` to `100`.

func (*Driver) Forward Uses

func (a *Driver) Forward(speed int)

Forward causes the drone go forward, controls the pitch. speed can be a value from `0` to `100`.

func (*Driver) Halt Uses

func (a *Driver) Halt() (err error)

Halt halts the Bebop Driver

func (*Driver) HullProtection Uses

func (a *Driver) HullProtection(protect bool) error

HullProtection tells the drone if the hull/prop protectors are attached. This is needed to adjust flight characteristics of the Bebop.

func (*Driver) Land Uses

func (a *Driver) Land()

Land causes the drone to land

func (*Driver) Left Uses

func (a *Driver) Left(speed int)

Left causes the drone to bank to the left, controls the roll, which is a horizontal movement using the camera as a reference point. speed can be a value from `0` to `100`.

func (*Driver) Name Uses

func (a *Driver) Name() string

Name returns the Bebop Drivers Name

func (*Driver) Outdoor Uses

func (a *Driver) Outdoor(outdoor bool) error

Outdoor tells the drone if flying Outdoor or not. This is needed to adjust flight characteristics of the Bebop.

func (*Driver) Right Uses

func (a *Driver) Right(speed int)

Right causes the drone to bank to the right, controls the roll, which is a horizontal movement using the camera as a reference point. speed can be a value from `0` to `100`.

func (*Driver) SetName Uses

func (a *Driver) SetName(n string)

SetName sets the Bebop Drivers Name

func (*Driver) Start Uses

func (a *Driver) Start() (err error)

Start starts the Bebop Driver

func (*Driver) StartRecording Uses

func (a *Driver) StartRecording() error

StartRecording starts the recording video to the drones interal storage

func (*Driver) Stop Uses

func (a *Driver) Stop()

Stop makes the drone to hover in place.

func (*Driver) StopRecording Uses

func (a *Driver) StopRecording() error

StopRecording stops a previously started recording

func (*Driver) TakeOff Uses

func (a *Driver) TakeOff()

TakeOff makes the drone start flying

func (*Driver) Up Uses

func (a *Driver) Up(speed int)

Up makes the drone gain altitude. speed can be a value from `0` to `100`.

func (*Driver) Video Uses

func (a *Driver) Video() chan []byte

Video returns a channel which raw video frames will be broadcast on

func (*Driver) VideoEnable Uses

func (a *Driver) VideoEnable(enable bool) error

VideoEnable tells the drone to start/stop streaming video

func (*Driver) VideoStreamMode Uses

func (a *Driver) VideoStreamMode(mode int8) error

VideoStreamMode tells the drone what mode to use for streaming video

Package bebop imports 3 packages (graph). Updated 2018-09-02. Refresh now. Tools for package owners.