Go to Post If 100 people from ChiefDelphi all wrote one full article on something that they are an 'expert' in, FIRSTwiki would be even better. - artdutra04 [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
  #1   Spotlight this post!  
Unread 25-01-2011, 15:42
aya94 aya94 is offline
Registered User
no team
 
Join Date: Jan 2010
Location: ISRAEL
Posts: 17
aya94 is an unknown quantity at this point
windriver help!!

Hi:
I am part of team 1946 , and we are now writing our robot cod for season 2011 , our programming language is C++, and we kind of have a little problem ..
We finished the mecanum wheels programming and they worked perfectly, now we are about to program the pneumatic hand. Basically the hand is a gripper,that opens when pressing button (2) on the joystick and closes when pressing button (3) ,we wrote a cod for that but it keeps giving us errors.
It will be great if you helped us to figure out what is the problem exactly with our code …
here is our code (this is a part of the entire code ,we defind (solenoid gripper_o) and solenoid gripper_c)


bool gripper_cTrig = Leftstick.GetRawButton(3);
bool gripper_oTrig = Leftstick.GetRawButton(2);

if (gripper_oTrig)
{
gripper_o.Set(true);
gripper_c.Set(false);
}
else if(gripper_cTrig)
{

gripper_o.Set(false);
gripper_c.Set(true);
}
else
{
gripper_o.Set(false);
gripper_c.Set(false);
}
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 13:37.

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