OCCRA
Go to Post Just the fact we were selected to compete in the eliminations energized the kids more than anything I had seen - Taylor [more]
Home
Go Back   Chief Delphi > FIRST > General Forum
CD-Events   CD-Media   CD-Spy   FRC-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 02-11-2012, 12:45 PM
goonsquad3604 goonsquad3604 is offline
Registered User
FRC #3604
 
Join Date: Feb 2012
Location: Woodhaven
Posts: 1
goonsquad3604 is on a distinguished road
Java Autonomous

We are team 3604 and we program in java. Are autonomous method for interativeRobot is having issues. Any ideas?

public void autonomousContinuous()
{
getWatchdog().setEnabled(true);
getWatchdog().feed();


compressor.start();
in.set(true);
out.set(false);
in.set(false);

getWatchdog().feed();
Timer.delay(4);

getWatchdog().feed();
out.set(true);
out.set(false);

getWatchdog().feed();
Timer.delay(2);

getWatchdog().feed();
in.set(true);
in.set(false);

getWatchdog().feed();
Timer.delay(4);

getWatchdog().feed();
out.set(true);
out.set(false);

getWatchdog().feed();
Timer.delay(2);

getWatchdog().feed();
in.set(true);
in.set(false);
getWatchdog().feed();
}
Reply With Quote
  #2   Spotlight this post!  
Unread 02-11-2012, 01:25 PM
theprgramerdude theprgramerdude is offline
WPI Freshman
AKA: Alex
FRC #2503 (Warrior Robotics)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2008
Location: Brainerd, Minnesota
Posts: 347
theprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud of
Re: Java Autonomous

Um.... this is impossible to debug without the rest of the program. One issue, though, is that you're not feeding the watchdog enough. You're also doing absolutely nothing with what I believe is the solenoids... Yeah, you're doing absolutely nothing in your program at all, aside from trying to start the compressor -> which will fail, because you're not feeding the watchdog enough.
__________________
Attending: MN Duluth Regional
Reply With Quote
  #3   Spotlight this post!  
Unread 02-11-2012, 02:37 PM
Chris27's Avatar
Chris27 Chris27 is offline
Registered User
AKA: Chris Freeman
FRC #1625 (Winnovation)
Team Role: Alumni
 
Join Date: Mar 2005
Rookie Year: 2004
Location: Mountain View
Posts: 196
Chris27 has a brilliant futureChris27 has a brilliant futureChris27 has a brilliant futureChris27 has a brilliant futureChris27 has a brilliant futureChris27 has a brilliant futureChris27 has a brilliant futureChris27 has a brilliant futureChris27 has a brilliant futureChris27 has a brilliant futureChris27 has a brilliant future
Re: Java Autonomous

For one, your going about overriding autonomousContinuous() incorrectly. This is a function that will be executed at a fixed interval. I forgot what the exact interval is, but it is around ~50ms. It makes no sense to call Timer.delay or any function that blocks (i.e. waits for a long time for the function to return before moving on) inside autonomousContinuous() as this function should return quickly (no longer then the interval time).
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 09:44 PM.

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


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