Go to Post Moral of the story: Crashes happen, things break... SHIFT HAPPENS. - Qbranch [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
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
  #7   Spotlight this post!  
Unread 25-11-2015, 13:24
tomy tomy is offline
Registered User
FRC #3038 (I.C.E. Robotics)
Team Role: Mentor
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Stacy, Minnesota
Posts: 494
tomy has a spectacular aura abouttomy has a spectacular aura about
Re: Off Season Programming Question: Switch Statements

Quote:
Originally Posted by GeeTwo View Post
Did you put this in the IsAutonomous && IsEnabled loop?


Yes. I figured out the problem and I'm trying to think of a way to fix it.

Code:
case 2:
     if(pid.OnTarget()){
          step++;
     }
     break;
That section of code is not change the value of step. I put "step" on the smart dash board and once it gets to case 2 it doesn't move on to case 3. I also checked the value of the encoder with the smart dashboard and it is getting to get set point.


EDIT: I just put the pid.OnTarget(); on the smart dashboard; it never changes to true. I cant figure out why.

Last edited by tomy : 25-11-2015 at 13:32.
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 14:04.

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