Tetrapod Project
motor_constants.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define MOTOR_ADDRESS_OFFSET   0x140
 
#define MOTOR_COMMAND_READ_PID_PARAMETERS   0x30
 
#define MOTOR_COMMAND_WRITE_PID_PARAMETERS_TO_RAM   0x31
 
#define MOTOR_COMMAND_WRITE_PID_PARAMETERS_TO_ROM   0x32
 
#define MOTOR_COMMAND_READ_ACCELERATION   0x33
 
#define MOTOR_COMMAND_WRITE_ACCELERATION_TO_RAM   0x34
 
#define MOTOR_COMMAND_READ_ENCODER_POSITION   0x90
 
#define MOTOR_COMMAND_WRITE_ENCODER_POSITION_OFFSET   0x91
 
#define MOTOR_COMMAND_WRITE_CURRENT_POSITION_TO_ROM   0x19
 
#define MOTOR_COMMAND_READ_MULTI_TURN_ANGLE   0x92
 
#define MOTOR_COMMAND_READ_SINGLE_CIRCLE_COMMAND   0x94
 
#define MOTOR_COMMAND_READ_MOTOR_STATUS_1_AND_ERROR_FLAG   0x9A
 
#define MOTOR_COMMAND_CLEAR_MOTOR_ERROR_FLAG   0x9B
 
#define MOTOR_COMMAND_READ_MOTOR_STATUS_2   0x9C
 
#define MOTOR_COMMAND_READ_MOTOR_STATUS_3   0x9D
 
#define MOTOR_COMMAND_MOTOR_OFF   0x80
 
#define MOTOR_COMMAND_MOTOR_STOP   0x81
 
#define MOTOR_COMMAND_MOTOR_RUNNING   0x88
 
#define MOTOR_COMMAND_TORQUE_CLOSED_LOOP   0xA1
 
#define MOTOR_COMMAND_SPEED_CLOSED_LOOP   0xA2
 
#define MOTOR_COMMAND_POSITION_CLOSED_LOOP_1   0xA3
 
#define MOTOR_COMMAND_POSITION_CLOSED_LOOP_2   0xA4
 
#define MOTOR_COMMAND_POSITION_CLOSED_LOOP_3   0xA5
 
#define MOTOR_COMMAND_POSITION_CLOSED_LOOP_4   0xA6
 

Variables

const double GEAR_REDUCTION = 6.0
 
const double ROTATION_DISTANCE = 60.0
 
const int MOTOR_BAUD_RATE = 1000000
 
const int MAX_ENCODER_VALUE = 65535
 
const int MAX_TORQUE_CURRENT = 1200
 
const double MAX_TORQUE = 26.88
 
const double MULTI_TURN_THRESHOLD = 60.0
 

Macro Definition Documentation

◆ MOTOR_ADDRESS_OFFSET

#define MOTOR_ADDRESS_OFFSET   0x140

Definition at line 23 of file motor_constants.h.

◆ MOTOR_COMMAND_READ_PID_PARAMETERS

#define MOTOR_COMMAND_READ_PID_PARAMETERS   0x30

Definition at line 29 of file motor_constants.h.

◆ MOTOR_COMMAND_WRITE_PID_PARAMETERS_TO_RAM

#define MOTOR_COMMAND_WRITE_PID_PARAMETERS_TO_RAM   0x31

Definition at line 30 of file motor_constants.h.

◆ MOTOR_COMMAND_WRITE_PID_PARAMETERS_TO_ROM

#define MOTOR_COMMAND_WRITE_PID_PARAMETERS_TO_ROM   0x32

Definition at line 31 of file motor_constants.h.

◆ MOTOR_COMMAND_READ_ACCELERATION

#define MOTOR_COMMAND_READ_ACCELERATION   0x33

Definition at line 32 of file motor_constants.h.

◆ MOTOR_COMMAND_WRITE_ACCELERATION_TO_RAM

#define MOTOR_COMMAND_WRITE_ACCELERATION_TO_RAM   0x34

Definition at line 33 of file motor_constants.h.

◆ MOTOR_COMMAND_READ_ENCODER_POSITION

#define MOTOR_COMMAND_READ_ENCODER_POSITION   0x90

Definition at line 34 of file motor_constants.h.

◆ MOTOR_COMMAND_WRITE_ENCODER_POSITION_OFFSET

#define MOTOR_COMMAND_WRITE_ENCODER_POSITION_OFFSET   0x91

Definition at line 35 of file motor_constants.h.

◆ MOTOR_COMMAND_WRITE_CURRENT_POSITION_TO_ROM

#define MOTOR_COMMAND_WRITE_CURRENT_POSITION_TO_ROM   0x19

Definition at line 36 of file motor_constants.h.

◆ MOTOR_COMMAND_READ_MULTI_TURN_ANGLE

#define MOTOR_COMMAND_READ_MULTI_TURN_ANGLE   0x92

Definition at line 37 of file motor_constants.h.

◆ MOTOR_COMMAND_READ_SINGLE_CIRCLE_COMMAND

#define MOTOR_COMMAND_READ_SINGLE_CIRCLE_COMMAND   0x94

Definition at line 38 of file motor_constants.h.

◆ MOTOR_COMMAND_READ_MOTOR_STATUS_1_AND_ERROR_FLAG

#define MOTOR_COMMAND_READ_MOTOR_STATUS_1_AND_ERROR_FLAG   0x9A

Definition at line 39 of file motor_constants.h.

◆ MOTOR_COMMAND_CLEAR_MOTOR_ERROR_FLAG

#define MOTOR_COMMAND_CLEAR_MOTOR_ERROR_FLAG   0x9B

Definition at line 40 of file motor_constants.h.

◆ MOTOR_COMMAND_READ_MOTOR_STATUS_2

#define MOTOR_COMMAND_READ_MOTOR_STATUS_2   0x9C

Definition at line 41 of file motor_constants.h.

◆ MOTOR_COMMAND_READ_MOTOR_STATUS_3

#define MOTOR_COMMAND_READ_MOTOR_STATUS_3   0x9D

Definition at line 42 of file motor_constants.h.

◆ MOTOR_COMMAND_MOTOR_OFF

#define MOTOR_COMMAND_MOTOR_OFF   0x80

Definition at line 43 of file motor_constants.h.

◆ MOTOR_COMMAND_MOTOR_STOP

#define MOTOR_COMMAND_MOTOR_STOP   0x81

Definition at line 44 of file motor_constants.h.

◆ MOTOR_COMMAND_MOTOR_RUNNING

#define MOTOR_COMMAND_MOTOR_RUNNING   0x88

Definition at line 45 of file motor_constants.h.

◆ MOTOR_COMMAND_TORQUE_CLOSED_LOOP

#define MOTOR_COMMAND_TORQUE_CLOSED_LOOP   0xA1

Definition at line 46 of file motor_constants.h.

◆ MOTOR_COMMAND_SPEED_CLOSED_LOOP

#define MOTOR_COMMAND_SPEED_CLOSED_LOOP   0xA2

Definition at line 47 of file motor_constants.h.

◆ MOTOR_COMMAND_POSITION_CLOSED_LOOP_1

#define MOTOR_COMMAND_POSITION_CLOSED_LOOP_1   0xA3

Definition at line 48 of file motor_constants.h.

◆ MOTOR_COMMAND_POSITION_CLOSED_LOOP_2

#define MOTOR_COMMAND_POSITION_CLOSED_LOOP_2   0xA4

Definition at line 49 of file motor_constants.h.

◆ MOTOR_COMMAND_POSITION_CLOSED_LOOP_3

#define MOTOR_COMMAND_POSITION_CLOSED_LOOP_3   0xA5

Definition at line 50 of file motor_constants.h.

◆ MOTOR_COMMAND_POSITION_CLOSED_LOOP_4

#define MOTOR_COMMAND_POSITION_CLOSED_LOOP_4   0xA6

Definition at line 51 of file motor_constants.h.

Variable Documentation

◆ GEAR_REDUCTION

const double GEAR_REDUCTION = 6.0

Definition at line 5 of file motor_constants.h.

◆ ROTATION_DISTANCE

const double ROTATION_DISTANCE = 60.0

Definition at line 8 of file motor_constants.h.

◆ MOTOR_BAUD_RATE

const int MOTOR_BAUD_RATE = 1000000

Definition at line 11 of file motor_constants.h.

◆ MAX_ENCODER_VALUE

const int MAX_ENCODER_VALUE = 65535

Definition at line 14 of file motor_constants.h.

◆ MAX_TORQUE_CURRENT

const int MAX_TORQUE_CURRENT = 1200

Definition at line 17 of file motor_constants.h.

◆ MAX_TORQUE

const double MAX_TORQUE = 26.88

Definition at line 20 of file motor_constants.h.

◆ MULTI_TURN_THRESHOLD

const double MULTI_TURN_THRESHOLD = 60.0

Definition at line 26 of file motor_constants.h.