Documentation ¶
Overview ¶
Package bebop provides the Gobot adaptor and driver for the Parrot Bebop.
Installing:
go get -d -u github.com/hybridgroup/gobot/... && go install github.com/hybridgroup/gobot/platforms/bebop
For more information refer to the bebop README: https://github.com/hybridgroup/gobot/tree/master/platforms/bebop
Index ¶
- Constants
- type BebopAdaptor
- type BebopDriver
- func (a *BebopDriver) Backward(speed int)
- func (a *BebopDriver) Clockwise(speed int)
- func (a *BebopDriver) Connection() gobot.Connection
- func (a *BebopDriver) CounterClockwise(speed int)
- func (a *BebopDriver) Down(speed int)
- func (a *BebopDriver) Forward(speed int)
- func (a *BebopDriver) Halt() (errs []error)
- func (a *BebopDriver) HullProtection(protect bool) error
- func (a *BebopDriver) Land()
- func (a *BebopDriver) Left(speed int)
- func (a *BebopDriver) Name() string
- func (a *BebopDriver) Outdoor(outdoor bool) error
- func (a *BebopDriver) Right(speed int)
- func (a *BebopDriver) Start() (errs []error)
- func (a *BebopDriver) StartRecording() error
- func (a *BebopDriver) Stop()
- func (a *BebopDriver) StopRecording() error
- func (a *BebopDriver) TakeOff()
- func (a *BebopDriver) Up(speed int)
- func (a *BebopDriver) Video() chan []byte
Constants ¶
const (
// Flying event
Flying = "flying"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BebopAdaptor ¶
type BebopAdaptor struct {
// contains filtered or unexported fields
}
BebopAdaptor is gobot.Adaptor representation for the Bebop
func NewBebopAdaptor ¶
func NewBebopAdaptor(name string) *BebopAdaptor
NewBebopAdaptor returns a new BebopAdaptor
func (*BebopAdaptor) Connect ¶
func (a *BebopAdaptor) Connect() (errs []error)
Connect establishes a connection to the ardrone
func (*BebopAdaptor) Finalize ¶
func (a *BebopAdaptor) Finalize() (errs []error)
Finalize terminates the connection to the ardrone
func (*BebopAdaptor) Name ¶
func (a *BebopAdaptor) Name() string
Name returns the BebopAdaptors Name
type BebopDriver ¶
BebopDriver is gobot.Driver representation for the Bebop
func NewBebopDriver ¶
func NewBebopDriver(connection *BebopAdaptor, name string) *BebopDriver
NewBebopDriver creates an BebopDriver with specified name.
func (*BebopDriver) Backward ¶
func (a *BebopDriver) Backward(speed int)
Backward causes the drone go forward, controls the pitch. speed can be a value from `0` to `100`.
func (*BebopDriver) Clockwise ¶
func (a *BebopDriver) Clockwise(speed int)
Clockwise causes the drone to spin in clockwise direction speed can be a value from `0` to `100`.
func (*BebopDriver) Connection ¶
func (a *BebopDriver) Connection() gobot.Connection
Connection returns the BebopDrivers Connection
func (*BebopDriver) CounterClockwise ¶
func (a *BebopDriver) CounterClockwise(speed int)
CounterClockwise the drone to spin in counter clockwise direction speed can be a value from `0` to `100`.
func (*BebopDriver) Down ¶
func (a *BebopDriver) Down(speed int)
Down makes the drone reduce altitude. speed can be a value from `0` to `100`.
func (*BebopDriver) Forward ¶
func (a *BebopDriver) Forward(speed int)
Forward causes the drone go forward, controls the pitch. speed can be a value from `0` to `100`.
func (*BebopDriver) HullProtection ¶
func (a *BebopDriver) 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 (*BebopDriver) Left ¶
func (a *BebopDriver) 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 (*BebopDriver) Outdoor ¶
func (a *BebopDriver) Outdoor(outdoor bool) error
Outdoor tells the drone if flying Outdoor or not. This is needed to adjust flight characteristics of the Bebop.
func (*BebopDriver) Right ¶
func (a *BebopDriver) 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 (*BebopDriver) Start ¶
func (a *BebopDriver) Start() (errs []error)
Start starts the BebopDriver
func (*BebopDriver) StartRecording ¶
func (a *BebopDriver) StartRecording() error
StartRecording starts the recording video to the drones interal storage
func (*BebopDriver) StopRecording ¶
func (a *BebopDriver) StopRecording() error
StopRecording stops a previously started recording
func (*BebopDriver) Up ¶
func (a *BebopDriver) Up(speed int)
Up makes the drone gain altitude. speed can be a value from `0` to `100`.
func (*BebopDriver) Video ¶
func (a *BebopDriver) Video() chan []byte
Video returns a channel which raw video frames will be broadcast on