Class Motor

Class Documentation

class Motor

Public Functions

Motor()
void SetCurrentReference(double)
void SetVelocityReference(double)
void SetPositionReference(double)
void SetPositionOffset(double)
void SetKp(double)
void SetKd(double)
void SetSaturationCurrent(double)
void SetDriver(MotorDriver *driver)
void Print()
void Enable()
void Disable()
bool IsReady()
bool IsEnabled()
bool HasIndexBeenDetected()
bool GetIndexToggleBit()
double GetPosition()
double GetVelocity()
double GetCurrent()
double GetPositionOffset()
inline void set_position(double val)
inline void set_velocity(double val)
inline void set_current(double val)
inline void set_is_enabled(bool val)
inline void set_is_ready(bool val)
inline void set_has_index_been_detected(bool val)
inline void set_index_toggle_bit(bool val)
inline void set_position_ref(double val)
inline void set_velocity_ref(double val)
inline void set_current_ref(double val)
inline void set_current_sat(double val)
inline void set_kp(double val)
inline void set_kd(double val)
inline void set_enable(bool val)
inline void set_enable_position_rollover_error(bool val)
inline void set_enable_index_toggle_bit(bool val)
inline void set_enable_index_offset_compensation(bool val)
inline void set_driver(MotorDriver *new_driver)
inline double get_position()
inline double get_velocity()
inline double get_current()
inline bool get_is_enabled()
inline bool get_is_ready()
inline bool get_has_index_been_detected()
inline bool get_index_toggle_bit()
inline double get_position_ref()
inline double get_velocity_ref()
inline double get_current_ref()
inline double get_current_sat()
inline double get_kp()
inline double get_kd()
inline bool get_enable()
inline bool get_enable_position_rollover_error()
inline bool get_enable_index_toggle_bit()
inline bool get_enable_index_offset_compensation()
inline MotorDriver *get_driver()

Public Members

double position = 0.0
double velocity = 0.0
double current = 0.0
double position_offset = 0.0
bool is_enabled = false
bool is_ready = false
bool index_toggle_bit = false
bool has_index_been_detected = false
double position_ref = 0.0
double velocity_ref = 0.0
double current_ref = 0.0
double current_sat = 0.0
double kp = 0.0
double kd = 0.0
bool enable = false
bool enable_position_rollover_error = false
bool enable_index_toggle_bit = false
bool enable_index_offset_compensation = false
MotorDriver *driver