Our program won’t build-- there are no errors when cleaning project. Any suggestions would help
#include <IterativeRobot.h>
#include <Joystick.h>
#include <LiveWindow/LiveWindow.h>
#include <RobotDrive.h>
#include <Timer.h>
class Robot: public frc::IterativeRobot {
public:
Robot() {
drivetrain.SetExpiration(0.1);
intake.SetExpiration(0.1);
shooter.SetExpiration(0.1);
auger.SetExpiration(0.1);
timer.Start();
}
private:
frc::RobotDrive drivetrain { 0, 1 }; // Robot drive system
frc::RobotDrive intake { 2, 3 };
frc::RobotDrive shooter { 4, 6 };
frc::RobotDrive auger { 5, 7 };
frc::Joystick triggerstick { 0 };
frc::Joystick gamepad { 2 }; // Stick
frc::LiveWindow* lw = frc::LiveWindow::GetInstance();
frc::Timer timer;
void AutonomousInit() override {
timer.Reset();
timer.Start();
}
void AutonomousPeriodic() override {
// Drive for 2 seconds
if (timer.Get() < 2.0) {
drivetrain.Drive(-0.5, 0.0); // Drive forwards half speed
} else {
drivetrain.Drive(0.0, 0.0); // Stop robot
}
}
void TeleopInit() override {
}
void TeleopPeriodic() override {
// Drive with arcade style (use right stick)
//myRobot.ArcadeDrive(stick);
drivetrain.TankDrive(gamepad.GetRawAxis(1) * 0.75, gamepad.GetRawAxis(3) * 0.75);
//Intake Control
if (triggerstick.GetRawButton(4)) {
intake.Drive(1.0, 0.0);
} else {
intake.Drive(0.0, 0.0);
}
//Reverse Intake
//if (triggerstick.GetRawButton(3)) {
// intake.Drive(-1.0, 0.0);
//} else {
// intake.Drive(0.0, 0.0);
//}
//Rotate left slightly
//drivetrain.TankDrive(triggerstick.GetRawAxis(2) * 0.1 * -1, triggerstick.GetRawAxis(2) * 0.1 * -1 );
//Shooter control
shooter.Drive( triggerstick.GetRawAxis(3) * -1, 0.0 );
//Auger control
if (triggerstick.GetRawButton(1)) {
auger.Drive(1.0 , 0.0);
}
Wait(0.01);
void TestPeriodic()
lw->Run();
};
START_ROBOT_CLASS(Robot)