View Single Post
  #1   Spotlight this post!  
Unread 02-10-2012, 01:29 PM
dex dex is offline
Registered User
FRC #4145
 
Join Date: Jan 2012
Location: Ohio
Posts: 1
dex is an unknown quantity at this point
"cannot be resolved as a type" Error

We are working on making our switch to turn on and off our shooter system, a toggle and are getting an error.

Code:
package us.oh.k12.wkw.robot.command;

public class ToggleMotorStateCmd extends CommandBase {
    public ToggleMotorStateCmd(){
        super("ShooterTurnMotorOffCmd");
        this.requires(this.getShooterSystem());
    }

    protected void execute() {
         if (!this.getShooterSystem().isShootMotorOn()) {
             // motor is off, turn it on
             this.getShooterSystem().turnOnShootMotor();
         } else{
             //motor is on, turn it off
             this.getShooterSystem().turnOffShootMotor();
         }
     }
}
In a lot of our other commands we extend CommandBase just fine, but this one is saying "CommandBase cannot be resolved as a type." Let me know if you need more information. Below is the method header of a time when we extend command base and it works.
Code:
package us.oh.k12.wkw.robot.command;
public class GathererTurnOnCmd extends CommandBase{
   //code
}
Reply With Quote