Documentation ¶
Index ¶
- type QRCode
- func (q *QRCode) AppID() uint64
- func (q *QRCode) BssID() *net.HardwareAddr
- func (q *QRCode) CountryCode() string
- func (q *QRCode) Image(size int) (image.Image, error)
- func (q *QRCode) Message() string
- func (q *QRCode) Password() string
- func (q *QRCode) SsID() string
- func (q *QRCode) String() string
- func (q *QRCode) Text() (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type QRCode ¶
type QRCode struct {
// contains filtered or unexported fields
}
QRCode handles generating and parsing the data for the Robomaster connection qrcode that is used to associate the robot with an app ID and also to tell it about the network and password to use.
func NewFromMessage ¶
NewFromMessage parses the given message and returns a QRCode instance based on it. This message is what you got if you use a normal QRCode reader to read the Robomaster app generated QRCode.
func (*QRCode) BssID ¶
func (q *QRCode) BssID() *net.HardwareAddr
BssID returns the BSSID for this QRCode.
func (*QRCode) CountryCode ¶
CountryCode returns the country code for this QRCode.
func (*QRCode) Image ¶
Image returns an size X size image.Image that represents the QRCode instance. This image is readable by a Robomaster robot.
func (*QRCode) Message ¶
Message returns the message for this QRCode. This is the result of encoding the QRCode instance into a string that can be used to generate an actual qr-code image that can be used by a Robomaster robot.