Skip to content

Commit ae65689

Browse files
authored
Merge pull request #3 from wdiederi/turning_calib
fix: turning calibration
2 parents 4e89f4d + 18830fa commit ae65689

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

main_app.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,25 +40,25 @@ static void update_motor_driver_from_control_input( struct bt_hid_state* state )
4040
{
4141
if( swerve_right_rate > 0 )
4242
{
43-
right_output -= swerve_right_rate / 2;
43+
right_output -= swerve_right_rate;
4444
right_output = clamp(right_output, 0, 128);
4545
}
4646
else if( swerve_right_rate < 0 )
4747
{
48-
left_output += swerve_right_rate / 2;
48+
left_output += swerve_right_rate;
4949
left_output = clamp(left_output, 0, 128);
5050
}
5151
}
5252
else if( forward_speed < -20 )
5353
{
5454
if( swerve_right_rate > 0 )
5555
{
56-
right_output += swerve_right_rate / 2;
56+
right_output += swerve_right_rate;
5757
right_output = clamp(right_output, -127, 0);
5858
}
5959
else if( swerve_right_rate < 0 )
6060
{
61-
left_output -= swerve_right_rate / 2;
61+
left_output -= swerve_right_rate;
6262
left_output = clamp(left_output, -127, 0);
6363
}
6464
}

0 commit comments

Comments
 (0)