Hi,
I'm using one joystick and when I added it, I'm getting an error that the Joystick was not initialized in the constructor.
I'd really appreciate help. I also had to comment out the default command because of the errors it was causing.
Code:
OI::OI() {
// Process operator interface input here.
// BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS
joystick = new Joystick(0);
// SmartDashboard Buttons
SmartDashboard::PutData("Drive_Arcade", new Drive_Arcade());
SmartDashboard::PutData("Autonomous Command", new AutonomousCommand());
SmartDashboard::PutData("Lift_Up", new Lift_Up());
SmartDashboard::PutData("Lift_Down", new Lift_Down());
SmartDashboard::PutData("Drive_To_Platform", new Drive_To_Platform());
SmartDashboard::PutData("Backup", new Backup());
// END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS
}
// BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=FUNCTIONS
Joystick* OI::getJoystick() {
return joystick;
}