Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) ArmorModule() *armor.Armor
- func (c *Client) BlasterModule() *blaster.Blaster
- func (c *Client) ChassisModule() *chassis.Chassis
- func (c *Client) Close() error
- func (c *Client) GimbalModule() *gimbal.Gimbal
- func (c *Client) Open() error
- func (c *Client) RobotModule() *robot.Robot
- func (c *Client) SoundModule() *sound.Sound
- func (c *Client) VideoModule() *video.Video
Constants ¶
const ( CameraHorizontalResolutionPoints = 1280 CameraVerticalResolutionPoints = 720 CameraHorizontalFOVDegrees = 96 CameraVerticalFOVDegrees = 54 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client enables controlling a RoboMaster robot through the plain-text SDK API (https://robomaster-dev.readthedocs.io/en/latest/).
func NewClient ¶
NewClient returns a new client instance associated with the given ip. If ip is nil, the Client will try to detect a robot broadcasting its ip in the network.
func NewClientUSB ¶
NewClientUSB creates a Client that tries to connect to the default USB connection ip.
func NewClientWifiDirect ¶
NewClientWifiDirect creates a Client that tries to connect to the default WiFi Direct connection ip.
func (*Client) ArmorModule ¶
ArmorModule returns a pointer to the associated Armor module. Used for setting/getting hit sensitivity and detecting hits.
func (*Client) BlasterModule ¶
BlasterModule returns a pointer to the associated Video module. Used for firing beads.
func (*Client) ChassisModule ¶
ChassisModule returns a pointer to the associated Chassis module. Used for doing chassis-related operations.
func (*Client) Close ¶
Close exits SDk mode and closes the Client connection to the robot. Returns a nil error on success and a non-nil error on failure.
func (*Client) GimbalModule ¶
GimbalModule returns a pointer to the associated Gimbal module. Used for doing gimbal-related operations.
func (*Client) Open ¶
Open opens the Client connection to the robot and enters SDK mode. Returns a nil error on success and a non-nil error on failure.
func (*Client) RobotModule ¶
RobotModule returns a pointer to the associated Robot module. Used for doing generic robot-related operations.
func (*Client) SoundModule ¶
SoundModule returns a pointer to the associated Video module. Used for detecting applause (clapping) sounds.
func (*Client) VideoModule ¶
VideoModule returns a pointer to the associated Video module. Used for doing video-related operations.