Go to Post Reach out to successful teams and ask them for help, rather than complain about them. I have never seen a successful team deny help to anyone. - OZ_341 [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 20-02-2010, 21:35
EthanMiller EthanMiller is offline
Lead Programmer
AKA: Socks
FTC #4356 (The Zip Ties)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Clayton, NY
Posts: 121
EthanMiller has a spectacular aura aboutEthanMiller has a spectacular aura aboutEthanMiller has a spectacular aura about
Fix loop for control

For running the kicker, I need to have some delays. However, I also need the program to respond to driver input during this. My current code (Selection below) has to pause for the completion of the kick.

I'm not sure how to do it. Thanks for any help!

Code:
if (lastState == false && m_otherStick.getTrigger() == true) {
    trigger.set(Relay.Value.kForward);
    Timer.delay(1.1);
    Watchdog.getInstance().feed();
    trigger.set(Relay.Value.kOff);
    trigger.set(Relay.Value.kReverse);
    Watchdog.getInstance().feed();
    Timer.delay(1);
    trigger.set(Relay.Value.kOff);
    shoot.set(true); retract.set(false);
    Watchdog.getInstance().feed();
    Timer.delay(.4);
    shoot.set(false); retract.set(true);
    lastState = true;
} else if (lastState == true && m_otherStick.getTrigger() == false) {
    lastState = false;
}
__________________
When all else fails, read the manual.

FRC 1713 K Island Gears 2009, 2010 (Not 2011 due to budget, hopefully 2012!) - Fingerlakes Regional

FTC 4356 The Zip Ties 2010-2011 Season - NNYRC (2010 9th seed).
Reply With Quote
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
closed-loop torque (current) wheel control for mecanum Ether Programming 3 07-02-2010 00:54
Radio Packet loss + closed loop control system = lunging robot Dave K. Control System 5 20-02-2007 06:09
control loop frequency. Rickertsen2 Programming 1 12-01-2006 08:38
PID control loops - closed loop feedback KenWittlief Technical Discussion 56 26-04-2004 21:27
PID control loop/Encoder question Zee Programming 18 30-01-2004 23:14


All times are GMT -5. The time now is 08:52.

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