Skip to content

Commit

Permalink
Fixed typecasting in kinematic_common_interface
Browse files Browse the repository at this point in the history
  • Loading branch information
ember-auburn committed Aug 8, 2023
1 parent 0329841 commit 80de6f4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/world_interface/kinematic_common_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@ double setCmdVelSwerve(double j1x, double j1y, double j2x, double j2y, int drive
setMotorPower(motorid_t::frontRightWheel, (double)(driveTrainSwerve.wh[1]).control.wheelSpeed);
setMotorPower(motorid_t::rearRightWheel, (double)(driveTrainSwerve.wh[2]).control.wheelSpeed);

setMotorPos(motorid_t::frontLeftSteer, (double)(driveTrainSwerve.wh[0]).control.steeringTarget * 180.0 / 3.14159);
setMotorPos(motorid_t::rearLeftSteer, (double)(driveTrainSwerve.wh[3]).control.steeringTarget * 180.0 / 3.14159);
setMotorPos(motorid_t::frontRightSteer, (double)(driveTrainSwerve.wh[1]).control.steeringTarget * 180.0 / 3.14159);
setMotorPos(motorid_t::rearRightSteer, (double)(driveTrainSwerve.wh[2]).control.steeringTarget * 180.0 / 3.14159);
setMotorPos(motorid_t::frontLeftSteer, (int32_t)(driveTrainSwerve.wh[0]).control.steeringTarget * 180.0 / 3.14159);
setMotorPos(motorid_t::rearLeftSteer, (int32_t)(driveTrainSwerve.wh[3]).control.steeringTarget * 180.0 / 3.14159);
setMotorPos(motorid_t::frontRightSteer, (int32_t)(driveTrainSwerve.wh[1]).control.steeringTarget * 180.0 / 3.14159);
setMotorPos(motorid_t::rearRightSteer, (int32_t)(driveTrainSwerve.wh[2]).control.steeringTarget * 180.0 / 3.14159);

return 0.0;
}
Expand Down

0 comments on commit 80de6f4

Please sign in to comment.