View Single Post
  #9   Spotlight this post!  
Unread 14-02-2016, 18:55
pblankenbaker pblankenbaker is offline
Registered User
FRC #0868
 
Join Date: Feb 2012
Location: Carmel, IN, USA
Posts: 102
pblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of light
Re: Robot class cannot be instantiated

Try temporarily commenting out the setDefaultCommand(new armStart()) invocation and see if that clears up the error:

Code:
public void initDefaultCommand() {
  // Set the default command for a subsystem here.
  //setDefaultCommand(new MySpecialCommand());
  //setDefaultCommand(new armStart());
}
I think we ran into a similar issue at one point that was triggered by the order in which our commands and subsystems were being constructed.

We worked around the problem by providing an alternative version to our command's constructor which would accept the subsystem it would work with as a parameter. This would be something like:

Code:
public void initDefaultCommand() {
  // Pass reference to this subsystem to command constructor so that
  // we don't get into a race condition when the subsystem is first constructed
  setDefaultCommand(new armStart(this));
}
You will need to update or add a new constructor to your armStart command.

Not sure if this is the same issue you are hitting, but its an easy thing to test.
Reply With Quote