Quasics2021Code/MaeTester/src/main/cpp/commands/DriveAtPowerForMeters.cpp
// Called when the command is initially scheduled.
Called when the command is initially scheduled.
Called when the command is initially scheduled .
void DriveAtPowerForMeters::Initialize() {
  startingMeters = (drivebase->GetLeftEncoderDistance() +
                    drivebase->GetRightEncoderDistance()) /
                   2;
  destination = startingMeters + desiredMeters;
  drivebase->SetMotorSpeed(power, power);
  std::cout << "desiredMeters = " << desiredMeters
            << ", startingMeters = " << startingMeters
            << ", destination = " << destination << std::endl;
}
void DriveAtPowerForMeters :: Initialize ( ) { startingMeters = ( drivebase -> GetLeftEncoderDistance ( ) + drivebase -> GetRightEncoderDistance ( ) ) / 2 ; destination = startingMeters + desiredMeters ; drivebase -> SetMotorSpeed ( power , power ) ; std :: cout << " " << desiredMeters << " " << startingMeters << " " << destination << std :: endl ; }
Called when the command is initially scheduled.
Called when the command is initially scheduled .