Quasics2019Code/CanDriveTrain/src/main/cpp/commands/TankDrive.cpp
// Called repeatedly when this Command is scheduled to run
Called repeatedly when this Command is scheduled to run
Called repeatedly when this Command is scheduled to run
void TankDrive::Execute() {
  double leftStickReading = Robot::m_oi.GetLeftJoystick();
  double rightStickReading = Robot::m_oi.GetRightJoystick();
  if (std::abs(leftStickReading) < kDeadBandSize) {
    leftStickReading = 0.0;
  }
  if (std::abs(rightStickReading) < kDeadBandSize) {
    rightStickReading = 0.0;
  }
  Robot::driveBase->SetMotorSpeed(
      leftStickReading * mult,
      rightStickReading * mult);
}
void TankDrive :: Execute ( ) { double leftStickReading = Robot :: m_oi . GetLeftJoystick ( ) ; double rightStickReading = Robot :: m_oi . GetRightJoystick ( ) ; if ( std :: abs ( leftStickReading ) < kDeadBandSize ) { leftStickReading = 0.0 ; } if ( std :: abs ( rightStickReading ) < kDeadBandSize ) { rightStickReading = 0.0 ; } Robot :: driveBase -> SetMotorSpeed ( leftStickReading * mult , rightStickReading * mult ) ; }
Called repeatedly when this Command is scheduled to run
Called repeatedly when this Command is scheduled to run
// Software dead-band handling.