15#if defined(ARDUINO_TEENSY36) || defined(ARDUINO_TEENSY41)
53 virtual void read_data() = 0;
60 virtual void send_data(
float torque) = 0;
67 virtual void transaction(
float torque) = 0;
73 virtual void on_off() = 0;
79 virtual bool enable() = 0;
84 virtual bool enable(
bool overide) = 0;
89 virtual void zero() = 0;
106 virtual float get_Kt() = 0;
114 bool _prev_motor_enabled;
122class NullMotor :
public _Motor
127 void send_data(
float torque) {};
128 void transaction(
float torque) {};
130 bool enable() {
return true;};
131 bool enable(
bool overide) {
return true;};
133 float get_Kt() {
return 0.0;};
140class _CANMotor :
public _Motor
144 virtual ~_CANMotor(){};
145 void transaction(
float torque);
147 void send_data(
float torque);
150 bool enable(
bool overide);
153 void check_response();
157 void set_Kt(
float Kt);
170 float _float_to_uint(
float x,
float x_min,
float x_max,
int bits);
182 float _uint_to_float(
unsigned int x_int,
float x_min,
float x_max,
int bits);
188 void _handle_read_failure();
197 int _timeout_count = 0;
198 bool _enable_response;
199 const uint32_t _timeout = 500;
200 const uint32_t _timeout_count_max = 40;
202 std::queue<float> _measured_current;
203 const int _current_queue_size = 25;
204 const float _variance_threshold = 0.01;
211class AK60 :
public _CANMotor
241class AK80 :
public _CANMotor
Declares a class used to store data for the Exo to access.
Declares the functions needed and defines mapping between the INI keys and the exo components.
Class to store all the data related to the exo.
Definition ExoData.h:38
Definition MotorData.h:25
joint_id
Definition ParseIni.h:106
bool get_is_left(config_defs::joint_id id)
Takes in the joint id and returns if the left indicator bit is set as a bool.
Definition Utilities.cpp:10