Go to Post actually, I don't work with mechanics, so I just barely learned what Lexan was a few days ago...long story... It's amazing the variety of things FIRST teaches us!!! - tribotec_ca88 [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
  #3   Spotlight this post!  
Unread 16-04-2010, 17:38
krudeboy51's Avatar
krudeboy51 krudeboy51 is offline
Only Programmer
AKA: kory
FRC #0369 (369)
Team Role: Programmer
 
Join Date: Mar 2010
Rookie Year: 2010
Location: brooklyn
Posts: 151
krudeboy51 is a glorious beacon of lightkrudeboy51 is a glorious beacon of lightkrudeboy51 is a glorious beacon of lightkrudeboy51 is a glorious beacon of lightkrudeboy51 is a glorious beacon of light
Send a message via AIM to krudeboy51
Re: CAN ANYONE HELP ME PLEASE??

Quote:
Originally Posted by Radical Pi View Post
Huge flaw in your code. Here's a hypothetical situation based on the first one shown:

Button is 6 is pressed. The motor is set to 1.0. However, almost immediately after that, button 7 is checked and most likely set to 0.0.

Here's what I think you want:

Code:
if (ThirdStick->GetRawButton(6)) {
    ArmRelease->Set(1.0);
} else if (ThirdStick->GetRawButton(7)) {
    ArmRelease->Set(-1.0);
} else {
    ArmRelease->Set(0.0);
}
Also, I assume you mean if instead of while in that second code block. That version would only activate button 7 mode if button 6 was pressed
THANKS ALOT MAN!!!!, I FORGOT ALL ABOUT ELSE IF STATEMENTS
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
I'm Starting a Team, Can you help me please? Leav FIRST Lego League 2 14-09-2006 15:14
can anyone please tell mw where or with what can i lear programing in C techsage Programming 7 23-08-2005 00:25
please help! anyone not using Filemaker Quentinfool Scouting 0 04-02-2003 21:53
Can Anyone Help????? archiver 1999 0 23-06-2002 22:58
Can anyone help me??? archiver 2001 1 23-06-2002 22:17


All times are GMT -5. The time now is 13:50.

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