Go to Post So Love your robot, and it will love you. - Not2B [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 12-02-2014, 23:37
DSSRobotics DSSRobotics is offline
Registered User
FRC #5031
 
Join Date: Jan 2014
Location: Canada
Posts: 5
DSSRobotics is an unknown quantity at this point
[Help] Compressor Problem (Java)

So we want our compressor to start immediately once the robot has turned on and this is a simple java code we're experimenting with.

We've imported this class : Compressor compressor = new Compressor(1, 1);

And this is our current code:

public void robotInit() {
compressor.start();

}

public void disabled() {
compressor.stop();
}

Once I deploy this code I get an error. ([cRIO] Robot Drive... Output not updated often enough.)

In addition, I've confirmed that the compressor code is causing this problem because I commented out the compressor code and the cRIO accepted the code, but when I tried to deploy the code with the compressor I get that error. I'm not sure if our team's compressor code is correct or not so please help us out.
Reply With Quote
  #2   Spotlight this post!  
Unread 12-02-2014, 23:57
otherguy's Avatar
otherguy otherguy is offline
sparkE
AKA: James
FRC #2168 (The Aluminum Falcons)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: CT
Posts: 431
otherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to behold
Re: [Help] Compressor Problem (Java)

That problem is likely not compressor related.

You're using the RobotDrive class. If you don't update the ouputs frequently enough you will get that error. It's a safety feature. If your code goes off to lala land, the robot will stop itself automatically.

Do disable this feature take a look at the setSafetyEnabled method:

example:
Code:
drive.setSafetyEnabled(false)
__________________
http://team2168.org
Reply With Quote
  #3   Spotlight this post!  
Unread 13-02-2014, 01:34
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,572
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: [Help] Compressor Problem (Java)

The compressor code you posted will not cause the Robot Drive message by itself, unless it is conflicting with some of your other code. One reason might be that you are using relay 1 or DIO 1 for something else in the code also.

There is no need to disable the compressor in disabled(). In fact, with the code you posted, the compressor would never run, as it would be started in robotInit and then immediate stopped in disabled, and never re-enabled.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 11:28.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi