File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -918,15 +918,18 @@ bool Dynamixel2Arduino::getTorqueEnableStat(uint8_t id)
918918uint8_t Dynamixel2Arduino::getHardwareError (uint8_t id)
919919{
920920 uint16_t model_num = getModelNumberFromTable (id);
921+ uint8_t ret = 0 ;
921922
922923 if (model_num == AX12A || model_num == AX12W || model_num == AX18A || model_num == DX113 || model_num == DX116 || model_num == DX117 || model_num == RX10 || model_num == RX24F || model_num == RX28 || model_num == RX64 || model_num == EX106 || model_num == MX12W || model_num == MX28 || model_num == MX64 || model_num == MX106 || model_num == XL320 )
923924 {
924- setLastLibErrCode (DXL_LIB_ERROR_INVAILD_PROTOCOL_VERSION );
925-
926- return 0 ;
925+ setLastLibErrCode (DXL_LIB_ERROR_NOT_SUPPORTED );
926+ }
927+ else
928+ {
929+ ret = (uint8_t )readControlTableItem (ControlTableItem::HARDWARE_ERROR_STATUS , id);
927930 }
928931
929- return readControlTableItem (ControlTableItem:: HARDWARE_ERROR_STATUS , id) ;
932+ return ret ;
930933}
931934
932935int32_t Dynamixel2Arduino::readControlTableItem (uint8_t item_idx, uint8_t id, uint32_t timeout)
You can’t perform that action at this time.
0 commit comments