// Copyright (c) FIRST and other WPILib contributors. // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. #include "commands/DefaultDrive.h" #include DefaultDrive::DefaultDrive(DriveSubsystem* subsystem, std::function forward, std::function rotation) : m_drive{subsystem}, m_forward{std::move(forward)}, m_rotation{std::move(rotation)} { AddRequirements({subsystem}); } void DefaultDrive::Execute() { m_drive->ArcadeDrive(m_forward(), m_rotation()); }