You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code below is repeated in arcade_flipped, arcade_standard, and tank.
// Threshold if joysticks don't come back to perfect 0if (abs(l_stick) > JOYSTICK_THRESHOLD || abs(r_stick) > JOYSTICK_THRESHOLD) {
set_tank(r_stick + l_stick, r_stick - l_stick);
reset_drive_sensor();
}
// When joys are released, run active brake (P) on driveelse {
set_tank((0 - left_sensor()) * active_brake_kp, (0 - right_sensor()) * active_brake_kp);
}
Also, there's no reason to reset the drive sensors in opcontrol unless active brake is being used. if (active_brake_kp != 0) should be in front of reset_drive_sensor().
The text was updated successfully, but these errors were encountered:
The code below is repeated in
arcade_flipped
,arcade_standard
, andtank
.Also, there's no reason to reset the drive sensors in opcontrol unless active brake is being used.
if (active_brake_kp != 0)
should be in front ofreset_drive_sensor()
.The text was updated successfully, but these errors were encountered: