blob: dfd8bb9ce1915b34867799ab7cee3382ae92e99b [file] [log] [blame]
#ifndef Y2019_JOYSTICK_ANGLE_H_
#define Y2019_JOYSTICK_ANGLE_H_
#include "frc971/input/driver_station_data.h"
using ::frc971::input::driver_station::Data;
using ::frc971::input::driver_station::JoystickAxis;
namespace y2019 {
namespace input {
namespace joysticks {
bool AngleCloseTo(double angle, double near, double range);
enum class JoystickAngle {
kDefault,
kUpperRight,
kMiddleRight,
kLowerRight,
kUpperLeft,
kMiddleLeft,
kLowerLeft
};
JoystickAngle GetJoystickPosition(const JoystickAxis &x_axis,
const JoystickAxis &y_axis, const Data &data);
JoystickAngle GetJoystickPosition(float x_axis, float y_axis);
} // namespace joysticks
} // namespace input
} // namespace y2019
#endif // Y2019_JOYSTICK_ANGLE_H_