|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#3
|
||||
|
||||
|
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. |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|