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) 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) 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) 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" )
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.ClientAdaptor) *Driver
NewDriver creates a Parrot Minidrone Driver
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
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) HullProtection ¶
HullProtection is not supported by the Parrot Minidrone
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