RobotHardware-UESTC/Hardware/银星机器人底盘/PiRobot-YH_Firmware v1.0/STM32/Lib/Joystick/joystick.h

22 lines
427 B
C
Raw Normal View History

2024-01-20 13:19:09 +08:00
#ifndef PIBOT_JOYSTICK_H_
#define PIBOT_JOYSTICK_H_
#include "pstwo.h" //for v1.6
class Joystick
{
public:
Joystick();
bool init();
void test();
bool check(short& liner_x, short liner_y, short& angular_z);
private:
bool holonomic_check(short& liner_x, short liner_y, short& angular_z);
bool nonholonomic_check(short& liner_x, short liner_y, short& angular_z);
private:
int error;
};
#endif