View Single Post
  #1   Spotlight this post!  
Unread 03-07-2015, 06:47 PM
Technette Technette is offline
Registered User
FRC #2404
 
Join Date: Jan 2014
Location: Glendale, California
Posts: 6
Technette is an unknown quantity at this point
Angry Joystick not initialized Error

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;
}
Reply With Quote