Skip to content

Commit

Permalink
Merge pull request #44 from RoboTeamTwente/kicker_calibrate2
Browse files Browse the repository at this point in the history
new calibration
  • Loading branch information
JWillegers authored Jul 16, 2024
2 parents d857dd3 + 37d340f commit b61e33a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Core/Src/kicker_chipper_board/peripherals/shoot.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,11 @@ int calculateShootingTime(shoot_types type, float speed) {
if(MAX_BALL_SPEED < speed) speed = MAX_BALL_SPEED;

if (type == shoot_Kick) {
int kickTime = (int)(speed * speed * 59.9f + 304.5f * speed + 1082.5f); //transfer function to convert m/s to time in us
int kickTime = (int)(speed * speed * 67.5f + 340.4f * speed + 1075.9f); //transfer function to convert m/s to time in us
return kickTime;

} else if (type == shoot_Chip) {
int chipTime = (int)(speed * speed * 59.9f + 304.5f * speed + 1082.5f);
int chipTime = (int)(speed * speed * 67.5f + 340.4f * speed + 1075.9f);
return chipTime;
}
return 0;
Expand Down

0 comments on commit b61e33a

Please sign in to comment.