Program won't build?

Our program won’t build-- there are no errors when cleaning project. Any suggestions would help :slight_smile:

#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() &lt; 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-&gt;Run();
};

START_ROBOT_CLASS(Robot)

Our program won’t build-- there are no errors when cleaning project. Any suggestions would help :slight_smile:

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

Error messages would help, but I think these lines should be using parens () not braces {}.

You’re half right. The braces there are a problems, but replacing them with parens isn’t going to fix things, since that’s not a proper way to define and instantiate a variable. Should be more like:
frc::RobotDrive *drive;

and then a line inside RobotInit that says:
drive = new RobotDrive(0,1);

Also, TestPeriodic is wrong:
void TestPeriodic()
lw->Run();

should be:
void TestPeriodic()
{
lw->Run();
}

Yes it is. And the braces are valid. Please don’t spread misinformation.

To answer the question, “clean” simply deletes the incremental build files. Do Project > Build in Eclipse to actually build, and see if there are any errors.

Thanks, I wasn’t aware of that style of initialization.

They’re still missing a mess of braces at the tail end of that code, though.