Go to Post I can't wait till FIRST starts giving anti-gravity kits inside the kit of parts. - Rob Colatutto [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
  #18   Spotlight this post!  
Unread 03-01-2014, 06:45 PM
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: URGENT:Auto Problem trying to fix before tomorrow

Can you add the following SmartDashboard outputs to observe the time the launcher should be raising and run your auton code in the pits with your robot up on blocks without loading a ball?


Code:
public void autonomous() { 
    myDrive.setSafetyEnabled(false);

    // Start driving and lifting the launcher immediately
    myDrive.drive(-.5, 0.0);

    startRaisingLauncher(); 
    SmartDashboard.putBoolean("Raising Launcher", true);

    // Stop driving after 3.5 seconds
    Timer.delay(3.5);
    myDrive.stopMotor(); 

    // Stop raising launcher after 4.5 more seconds (8 seconds total
    // raising launcher)
    Timer.delay(4.5); 
    stopMovingLauncher();
    SmartDashboard.putBoolean("Raising Launcher", false);

    stopAll();
}
If the delays are working properly and all of the code is being executed, you should observe a new value "Raising Launcher" appear on your smart dashboard and you should see it go true at the start of auton and then change to "false" roughly 8 seconds later. If you don't see it turn to "false" it indicates something has failed somewhere (you will probably have a stack trace in your console window on NetBeans).

Also, would it be possible for you to post your current code so we can see how your fire the ball in teleop? Maybe there is a step or procedure missing in auton.
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


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

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