Skip to content

Commit

Permalink
Started work for temperature reading
Browse files Browse the repository at this point in the history
Add new MC error code+string entry for temperature limit overcoming
  • Loading branch information
MSECode authored and valegagge committed Nov 28, 2023
1 parent 9ba514d commit 09fa00b
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 21 deletions.
3 changes: 2 additions & 1 deletion can/canProtocolLib/iCubCanProto_motorControlMessages.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@ extern "C" {
#define ICUBCANPROTO_POL_MC_CMD__SET_TCFILTER_TYPE 118
#define ICUBCANPROTO_POL_MC_CMD__SET_MOTOR_CONFIG 119
#define ICUBCANPROTO_POL_MC_CMD__GET_TCFILTER_TYPE 120
#define ICUBCANPROTO_POL_MC_CMD_MAXNUM (ICUBCANPROTO_POL_MC_CMD__GET_TCFILTER_TYPE + 1)
#define ICUBCANPROTO_POL_MC_CMD__SET_TEMPERATURE_LIMIT 121
#define ICUBCANPROTO_POL_MC_CMD_MAXNUM (ICUBCANPROTO_POL_MC_CMD__SET_TEMPERATURE_LIMIT + 1)



Expand Down
3 changes: 2 additions & 1 deletion eth/embobj/plus/comm-v2/icub/EoError.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,8 @@ const eoerror_valuestring_t eoerror_valuestrings_MC[] =
{eoerror_value_MC_generic_error, "MC: generic motor error.", "See 64 bit mask parameter"},
{eoerror_value_MC_motor_wrong_state, "MC: 2FOC wrong state. The 2FOC motor controller is in a control state different from required by the EMS.", "In par64 0xF0 is the mask of requested state, 0x0F is the mask of actual state. par16 = ID of joint."},
{eoerror_value_MC_joint_hard_limit, "MC: hard limit reached. The joint position is outside its hardware boundaries.", "In par16 = ID of joint."},
{eoerror_value_MC_motor_qencoder_phase_disappeared, "MC: qenc error has disappeared, warning counter has been reset.", ""}
{eoerror_value_MC_motor_qencoder_phase_disappeared, "MC: qenc error has disappeared, warning counter has been reset.", ""},
{eoerror_value_MC_motor_overheating, "MC: overheating. Temperature hardware limit exceeded. The motor has been turned off to prevent it from being damaged by overheating.", "In par16 = ID of the joint. In par64 0xFF is the mask of the raw tmperature feedback."}

}; EO_VERIFYsizeof(eoerror_valuestrings_MC, eoerror_value_MC_numberof*sizeof(const eoerror_valuestring_t))

Expand Down
40 changes: 21 additions & 19 deletions eth/embobj/plus/comm-v2/icub/EoError.h
Original file line number Diff line number Diff line change
Expand Up @@ -211,30 +211,32 @@ enum { eoerror_value_HW_numberof = 7 };
**/
typedef enum
{
eoerror_value_MC_motor_external_fault = 0,
eoerror_value_MC_motor_overcurrent = 1,
eoerror_value_MC_motor_i2t_limit = 2,
eoerror_value_MC_motor_hallsensors = 3,
eoerror_value_MC_motor_can_invalid_prot = 4,
eoerror_value_MC_motor_can_generic = 5,
eoerror_value_MC_motor_can_no_answer = 6,
eoerror_value_MC_axis_torque_sens = 7,
eoerror_value_MC_aea_abs_enc_invalid = 8,
eoerror_value_MC_aea_abs_enc_timeout = 9,
eoerror_value_MC_aea_abs_enc_spikes = 10,
eoerror_value_MC_motor_external_fault = 0,
eoerror_value_MC_motor_overcurrent = 1,
eoerror_value_MC_motor_i2t_limit = 2,
eoerror_value_MC_motor_hallsensors = 3,
eoerror_value_MC_motor_can_invalid_prot = 4,
eoerror_value_MC_motor_can_generic = 5,
eoerror_value_MC_motor_can_no_answer = 6,
eoerror_value_MC_axis_torque_sens = 7,
eoerror_value_MC_aea_abs_enc_invalid = 8,
eoerror_value_MC_aea_abs_enc_timeout = 9,
eoerror_value_MC_aea_abs_enc_spikes = 10,

eoerror_value_MC_motor_qencoder_dirty = 11,
eoerror_value_MC_motor_qencoder_index = 12,
eoerror_value_MC_motor_qencoder_phase = 13,
eoerror_value_MC_motor_qencoder_dirty = 11,
eoerror_value_MC_motor_qencoder_index = 12,
eoerror_value_MC_motor_qencoder_phase = 13,

eoerror_value_MC_generic_error = 14,
eoerror_value_MC_motor_wrong_state = 15,
eoerror_value_MC_generic_error = 14,
eoerror_value_MC_motor_wrong_state = 15,

eoerror_value_MC_joint_hard_limit = 16,
eoerror_value_MC_motor_qencoder_phase_disappeared = 17
eoerror_value_MC_joint_hard_limit = 16,
eoerror_value_MC_motor_qencoder_phase_disappeared = 17,

eoerror_value_MC_motor_overheating = 18
} eOerror_value_MC_t;

enum { eoerror_value_MC_numberof = 18 };
enum { eoerror_value_MC_numberof = 19 };



Expand Down

0 comments on commit 09fa00b

Please sign in to comment.