RobotHardware-UESTC/Hardware/Firmware/Gebot_Firmware v1.0/STM32/Lib/Joystick/joystick.h

22 lines
427 B
C++

#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