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 ¶
- type BebopAdaptor
- type Driver
- func (a *Driver) Backward(speed int)
- func (a *Driver) Clockwise(speed int)
- func (a *Driver) Connection() gobot.Connection
- func (a *Driver) CounterClockwise(speed int)
- func (a *Driver) Debug(f func(string, []byte))
- func (a *Driver) Down(speed int)
- func (a *Driver) Forward(speed int)
- func (a *Driver) Halt() (errs []error)
- func (a *Driver) HullProtection(protect bool) error
- func (a *Driver) Land()
- func (a *Driver) Left(speed int)
- func (a *Driver) Name() string
- func (a *Driver) Outdoor(outdoor bool) error
- func (a *Driver) Right(speed int)
- func (a *Driver) Start() (errs []error)
- func (a *Driver) StartRecording() error
- func (a *Driver) Stop()
- func (a *Driver) StopRecording() error
- func (a *Driver) StopTelemetry() error
- func (a *Driver) TakeOff()
- func (a *Driver) Up(speed int)
- func (a *Driver) Video() chan []byte
Constants ¶
This section is empty.
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
func (*BebopAdaptor) Telemetry ¶
func (a *BebopAdaptor) Telemetry() chan bbtelem.TelemetryPacket
Telemetry returns a channel on which to receive Telemetry from the device.
type Driver ¶
Driver is gobot.Driver representation for the Bebop
func NewBebopDriver ¶
func NewBebopDriver(connection *BebopAdaptor, name string) *Driver
NewBebopDriver creates an BebopDriver with specified name.
func (*Driver) Backward ¶
Backward causes the drone go forward, controls the pitch. speed can be a value from `0` to `100`.
func (*Driver) Clockwise ¶
Clockwise causes the drone to spin in clockwise direction speed can be a value from `0` to `100`.
func (*Driver) Connection ¶
func (a *Driver) Connection() gobot.Connection
Connection returns the Drivers Connection
func (*Driver) CounterClockwise ¶
CounterClockwise the drone to spin in counter clockwise direction speed can be a value from `0` to `100`.
func (*Driver) Debug ¶
Debug registers a given function to subscribe to all known Bebop Events, including "unknown" and "error"
func (*Driver) Forward ¶
Forward causes the drone go forward, controls the pitch. speed can be a value from `0` to `100`.
func (*Driver) HullProtection ¶
HullProtection tells the drone if the hull/prop protectors are attached. This is needed to adjust flight characteristics of the Bebop.
func (*Driver) Left ¶
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) Outdoor ¶
Outdoor tells the drone if flying Outdoor or not. This is needed to adjust flight characteristics of the Bebop.
func (*Driver) Right ¶
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) Start ¶
Start starts the Driver. This spins out a goroutine to read telemetry from the adaptor and post events;
func (*Driver) StartRecording ¶
StartRecording starts the recording video to the drones interal storage
func (*Driver) StopRecording ¶
StopRecording stops a previously started recording
func (*Driver) StopTelemetry ¶
StopTelemetry stops further telemetry messages being posted to the event queue, and closes the channel from the adaptor also.