Go to Post Go figure that by teaching you end up learning a lot through the process. ;) - Josh Fox [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 27-01-2015, 07:35
Mr.Paulson's Avatar
Mr.Paulson Mr.Paulson is offline
Registered User
FRC #4539
 
Join Date: Jan 2014
Rookie Year: 2010
Location: Minnesota
Posts: 43
Mr.Paulson has much to be proud ofMr.Paulson has much to be proud ofMr.Paulson has much to be proud ofMr.Paulson has much to be proud ofMr.Paulson has much to be proud ofMr.Paulson has much to be proud ofMr.Paulson has much to be proud ofMr.Paulson has much to be proud of
Red face Re: getting g++ and gcc errors

Ok...I apologize for the original post. I had a former student that came back this year to try to mentor post, and it was not very organized.

We have looked at other posts and come to the realization that the g++ and gcc errors SHOULDN"T be a big deal...hopefully that works out for us. Here is what we are having trouble with still:

All we are trying to do is program an XBox controller button. Last year in Windriver, we wrote the program this way:

if(Assist_Controller->GetRawButton(4)==1{
Talon5->Set(1);
}
else if(Assist_Controller->GetRawButton(1)==1){
Talon5->Set(-1);
}
else{
Talon5->Set(0);

This would make the "Y" button make the motor go one direction and the "A" button go the other direction.

This year, we have looked through the libraries and are unable to figure out how to code this appropriately. So far, this is what our coding team has come up with, but it results in a yellow question mark and says "Syntax Error":

if(Driver_Controller->bool GetRawButton(4)==0){
Talon3->Set(1);
}
else if(Driver_Controller->bool GetRawButton(1)==0){
Talon3->Set(-1);
}
else{
Talon3->Set(0);

Will this code work? If there is something wrong with this, any help is greatly appreciated.

Our coding mentor from the past two years is deep into his Electrical Engineering Degree and is not able to commit time to help us this year. I am the team lead mentor, but am having a very difficult time with programming (I am woodshop teacher by trade, trying to build robots with kids). We stuck with C++ because we liked our code from last year and had the basics understood, but with the Eclipse small changes are struggling.

Thank you in advance for your time and help.

...by the way, I tried to go in and edit the first post, and cannot figure out where to go to make that happen.
__________________
Team #4539
2015- Lake Superior Regional #1 Captain and Semifinalist (3276 & 4845)
Quality Award Sponsored by Motorola
1st Place Junkyard Robot
2015- 10,000 Lakes Regional #3 Captain and Quarterfinalist (1816 & 3081)
2014- Lake Superior Regional #4 Captain and Semifinalist (3755 & 3277)
1st Place Junkyard Robot
2013- FIRST Championship Newton Division Judges Award
Lake Superior Regional Finalists(3276 & 3277), Rookie All-Star Award, Highest Seeded Rookie Award, Most Creative Junkyard Robot Award
Team #3276
2012- Lake Superior Regional Quarterfinalist (3755 & 1816)
2011- 10,000 Lakes Regional Semifinalist (141 & 3082)
2010- 10,000 Lakes Regional Rookie Inspiration Award
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 12:01.

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