Documentation ¶
Overview ¶
Package minidrone contains the Gobot driver for the Parrot Minidrone.
For more information refer to the minidrone README: https://github.com/hybridgroup/gobot/blob/master/platforms/parrot/minidrone/README.md
Index ¶
- Constants
- func ValidatePitch(data float64, offset float64) int
- type Driver
- func (b *Driver) BackFlip() (err error)
- func (b *Driver) Backward(val int) error
- func (b *Driver) ClawControl(id uint8, mode uint8) (err error)
- func (b *Driver) Clockwise(val int) error
- func (b *Driver) Connection() gobot.Connection
- func (b *Driver) CounterClockwise(val int) error
- func (b *Driver) Down(val int) error
- func (b *Driver) Emergency() (err error)
- func (b *Driver) FlatTrim() (err error)
- func (b *Driver) Forward(val int) error
- func (b *Driver) FrontFlip() (err error)
- func (b *Driver) GenerateAllStates() (err error)
- func (b *Driver) GunControl(id uint8) (err error)
- func (b *Driver) Halt() (err error)
- func (b *Driver) HullProtection(protect bool) error
- func (b *Driver) Init() (err error)
- func (b *Driver) Land() (err error)
- func (b *Driver) Left(val int) error
- func (b *Driver) LeftFlip() (err error)
- func (b *Driver) LightControl(id uint8, mode uint8, intensity uint8) (err error)
- func (b *Driver) Name() string
- func (b *Driver) Outdoor(outdoor bool) error
- func (b *Driver) Right(val int) error
- func (b *Driver) RightFlip() (err error)
- func (b *Driver) SetName(n string)
- func (b *Driver) Start() (err error)
- func (b *Driver) StartPcmd()
- func (b *Driver) StartRecording() error
- func (b *Driver) Stop() error
- func (b *Driver) StopRecording() error
- func (b *Driver) TakeOff() (err error)
- func (b *Driver) TakePicture() (err error)
- func (b *Driver) Up(val int) error
- type Pcmd
Constants ¶
const ( // Battery event Battery = "battery" // FlightStatus event FlightStatus = "flightstatus" // Takeoff event Takeoff = "takeoff" // Hovering event Hovering = "hovering" // Flying event Flying = "flying" // Landing event Landing = "landing" // Landed event Landed = "landed" // Emergency event Emergency = "emergency" // Rolling event Rolling = "rolling" // FlatTrimChange event FlatTrimChange = "flattrimchange" // LightFixed mode for LightControl LightFixed = 0 // LightBlinked mode for LightControl LightBlinked = 1 // LightOscillated mode for LightControl LightOscillated = 3 // ClawOpen mode for ClawControl ClawOpen = 0 // ClawClosed mode for ClawControl ClawClosed = 1 )
Variables ¶
This section is empty.
Functions ¶
func ValidatePitch ¶ added in v1.2.0
ValidatePitch helps validate pitch values such as those created by a joystick to values between 0-100 that are required as params to Parrot Minidrone PCMDs
Types ¶
type Driver ¶
Driver is the Gobot interface to the Parrot Minidrone
func NewDriver ¶
func NewDriver(a ble.BLEConnector) *Driver
NewDriver creates a Parrot Minidrone Driver
func (*Driver) ClawControl ¶ added in v1.6.0
ClawControl controls the claw on the Parrot Mambo Params:
id - always 0 mode - either ClawOpen or ClawClosed
func (*Driver) Clockwise ¶
Clockwise tells drone to rotate in a clockwise direction. Pass in an int from 0-100.
func (*Driver) Connection ¶
func (b *Driver) Connection() gobot.Connection
Connection returns the BLE connection
func (*Driver) CounterClockwise ¶
CounterClockwise tells drone to rotate in a counter-clockwise direction. Pass in an int from 0-100.
func (*Driver) FlatTrim ¶
FlatTrim calibrates the Minidrone to use its current position as being level
func (*Driver) GenerateAllStates ¶
GenerateAllStates sets up all the default states aka settings on the drone
func (*Driver) GunControl ¶ added in v1.6.0
GunControl fires the gun on the Parrot Mambo Params:
id - always 0
func (*Driver) HullProtection ¶
HullProtection is not supported by the Parrot Minidrone
func (*Driver) LightControl ¶ added in v1.6.0
LightControl controls lights on those Minidrone models which have the correct hardware, such as the Maclane, Blaze, & Swat. Params:
id - always 0 mode - either LightFixed, LightBlinked, or LightOscillated intensity - Light intensity from 0 (OFF) to 100 (Max intensity). Only used in LightFixed mode.
func (*Driver) StartPcmd ¶
func (b *Driver) StartPcmd()
StartPcmd starts the continuous Pcmd communication with the Minidrone
func (*Driver) StartRecording ¶
StartRecording is not supported by the Parrot Minidrone
func (*Driver) Stop ¶
Stop tells the drone to stop moving in any direction and simply hover in place
func (*Driver) StopRecording ¶
StopRecording is not supported by the Parrot Minidrone
func (*Driver) TakePicture ¶ added in v1.1.0
TakePicture tells the Minidrone to take a picture