You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
robomaster-sdk/src/modules/chassis.c

34 lines
698 B
C

#include "message.h"
#include "connection.h"
#include "robomaster.h"
void
set_wheel_speed (
union Request* req,
uint16_t seq,
bool ack,
int16_t w1,
int16_t w2,
int16_t w3,
int16_t w4 ) {
req->wheel.wheel_speed[0] = w1;
req->wheel.wheel_speed[1] = w2;
req->wheel.wheel_speed[2] = w3;
req->wheel.wheel_speed[3] = w4;
req_finalize(seq, SET_WHEEL_SPEED_CMD, false, req);
}
void
chassis_speed_mode (
union Request* req,
uint16_t seq,
bool ack,
float x,
float y,
float z ) {
req->chsspeed.speed[0] = x;
req->chsspeed.speed[1] = y;
req->chsspeed.speed[2] = z;
req_finalize(seq, CHASSIS_SPEED_MODE_CMD, false, req);
}