Merge pull request #65 from ROBOTIS-GIT/feature_motion_module_gain_bug
- fixed motion module result gain bug
This commit is contained in:
		| @@ -1266,7 +1266,7 @@ void RobotisController::process() | ||||
|                   port_to_sync_write_position_[dxl->port_name_]->changeParam(dxl->id_, sync_write_data); | ||||
|  | ||||
|                 // if position p gain value is changed -> sync write | ||||
|                 if (dxl_state->position_p_gain_ != result_state->position_p_gain_) | ||||
|                 if (result_state->position_p_gain_ != 65535 && dxl_state->position_p_gain_ != result_state->position_p_gain_) | ||||
|                 { | ||||
|                   dxl_state->position_p_gain_ = result_state->position_p_gain_; | ||||
|                   uint8_t sync_write_data[4] = { 0 }; | ||||
| @@ -1280,7 +1280,7 @@ void RobotisController::process() | ||||
|                 } | ||||
|  | ||||
|                 // if position i gain value is changed -> sync write | ||||
|                 if (dxl_state->position_i_gain_ != result_state->position_i_gain_) | ||||
|                 if (result_state->position_i_gain_ != 65535 && dxl_state->position_i_gain_ != result_state->position_i_gain_) | ||||
|                 { | ||||
|                   dxl_state->position_i_gain_ = result_state->position_i_gain_; | ||||
|                   uint8_t sync_write_data[4] = { 0 }; | ||||
| @@ -1294,7 +1294,7 @@ void RobotisController::process() | ||||
|                 } | ||||
|  | ||||
|                 // if position d gain value is changed -> sync write | ||||
|                 if (dxl_state->position_d_gain_ != result_state->position_d_gain_) | ||||
|                 if (result_state->position_d_gain_ != 65535 && dxl_state->position_d_gain_ != result_state->position_d_gain_) | ||||
|                 { | ||||
|                   dxl_state->position_d_gain_ = result_state->position_d_gain_; | ||||
|                   uint8_t sync_write_data[4] = { 0 }; | ||||
| @@ -1325,7 +1325,7 @@ void RobotisController::process() | ||||
|                   port_to_sync_write_velocity_[dxl->port_name_]->changeParam(dxl->id_, sync_write_data); | ||||
|  | ||||
|                 // if velocity p gain gain value is changed -> sync write | ||||
|                 if (dxl_state->velocity_p_gain_ != result_state->velocity_p_gain_) | ||||
|                 if (result_state->velocity_p_gain_ != 65535 && dxl_state->velocity_p_gain_ != result_state->velocity_p_gain_) | ||||
|                 { | ||||
|                   dxl_state->velocity_p_gain_ = result_state->velocity_p_gain_; | ||||
|                   uint8_t sync_write_data[4] = { 0 }; | ||||
| @@ -1339,7 +1339,7 @@ void RobotisController::process() | ||||
|                 } | ||||
|  | ||||
|                 // if velocity i gain value is changed -> sync write | ||||
|                 if (dxl_state->velocity_i_gain_ != result_state->velocity_i_gain_) | ||||
|                 if (result_state->velocity_i_gain_ != 65535 && dxl_state->velocity_i_gain_ != result_state->velocity_i_gain_) | ||||
|                 { | ||||
|                   dxl_state->velocity_i_gain_ = result_state->velocity_i_gain_; | ||||
|                   uint8_t sync_write_data[4] = { 0 }; | ||||
| @@ -1353,7 +1353,7 @@ void RobotisController::process() | ||||
|                 } | ||||
|  | ||||
|                 // if velocity d gain value is changed -> sync write | ||||
|                 if (dxl_state->velocity_d_gain_ != result_state->velocity_d_gain_) | ||||
|                 if (result_state->velocity_d_gain_ != 65535 && dxl_state->velocity_d_gain_ != result_state->velocity_d_gain_) | ||||
|                 { | ||||
|                   dxl_state->velocity_d_gain_ = result_state->velocity_d_gain_; | ||||
|                   uint8_t sync_write_data[4] = { 0 }; | ||||
|   | ||||
| @@ -64,12 +64,12 @@ public: | ||||
|       goal_position_(0.0), | ||||
|       goal_velocity_(0.0), | ||||
|       goal_torque_(0.0), | ||||
|       position_p_gain_(0), | ||||
|       position_i_gain_(0), | ||||
|       position_d_gain_(0), | ||||
|       velocity_p_gain_(0), | ||||
|       velocity_i_gain_(0), | ||||
|       velocity_d_gain_(0), | ||||
|       position_p_gain_(65535), | ||||
|       position_i_gain_(65535), | ||||
|       position_d_gain_(65535), | ||||
|       velocity_p_gain_(65535), | ||||
|       velocity_i_gain_(65535), | ||||
|       velocity_d_gain_(65535), | ||||
|       position_offset_(0) | ||||
|   { | ||||
|     bulk_read_table_.clear(); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 zerom
					zerom