View Single Post
  #10   Spotlight this post!  
Unread 08-02-2014, 10:33
L_bot L_bot is offline
Registered User
AKA: Brian Kinkade
FRC #3489 (Catagory 5)
Team Role: Programmer
 
Join Date: Dec 2012
Rookie Year: 2011
Location: South carolina
Posts: 1
L_bot is an unknown quantity at this point
Re: Code for Can jaguars.

Quote:
EDIT: While unrelated to Jaguar problems, an additional problem has popped up in our Command-Based robot. Robot Builder's autogenerated code:
Code:
 
// RobotBuilder Version: 1.0
//
// This file was generated by RobotBuilder. It contains sections of
// code that are automatically generated and assigned by robotbuilder.
// These sections will be updated in the future when you export to
// Java from RobotBuilder. Do not put any code or make any change in
// the blocks indicating autogenerated code or it will be lost on an
// update. Deleting the comments indicating the section will prevent
// it from being updated in the future.
package org.usfirst.frc3244.RobotTest.subsystems;
import org.usfirst.frc3244.RobotTest.RobotMap;
import org.usfirst.frc3244.RobotTest.commands.*;
import edu.wpi.first.wpilibj.*;
import edu.wpi.first.wpilibj.command.Subsystem;
/**
 *
 */
public class Compressor extends Subsystem {
    // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DECLARATIONS
    Compressor compressor1 = RobotMap.compressorCompressor1;
    // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DECLARATIONS
    
    // Put methods for controlling this subsystem
    // here. Call these from Commands.
    public void initDefaultCommand() {
        // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DEFAULT_COMMAND
        setDefaultCommand(new compressorStart());
    // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DEFAULT_COMMAND
	
        // Set the default command for a subsystem here.
        //setDefaultCommand(new MySpecialCommand());
    }
}
causes netbeans to display an error message at line 20: "incompatible types: edu.wpi.first.wpilibj.Compressor cannot be converted to: org.usfirst.frc3244.RobotTest.subsystems.Compresso r". The RobotDrive has the same problem.
In response to your compressor problem if you change the subsystem name of the compressor to something like Airmaker or Airgetter it will fix the problem. The reason for this is because Robot builder does some auto naming and will try to call your compressor from another location.
Reply With Quote