![]() |
C Programming Question
Ok, before I begin let me start off by saying that I have checked around to find the answer ot my question and I have not found a suitable answer, this may be due to the lack of my attention span though...lol. Ok my problem is I'm trying to use the trim wheel on the joystick to set the robot into autonomous mode. Now I first added the
Code:
unsigned char wheel_right |
Re: C Programming Question
Quote:
Use one of the joystick buttons instead, say p1_sw_top, like: Code:
if (p1_sw_top) User_Autonomous_Code |
Re: C Programming Question
Thanx
|
Re: C Programming Question
just one more more question (maybe more depending on the answer...lol). im trying to write a practice autonomous code for the robot. my plan is to use the 'p1_sw_trig' button to enable a set of actions (in this case just to move the motor forward, then stop, then backward, then stop again using the counter function. im getting really weird syntax errors that i have no idea what's happening.
Code:
|
Re: C Programming Question
to your first post....if you need a variable in two classes than in the second you declare it:
code: extern vartype variable; in the second you forgot to close the IF statement with a } add id bfore the comments if you want to maintain pretty code the error is at that line bcause its either the end of the class or right before another method |
Re: C Programming Question
yeah im using 2 different computers so i couldn't copy and paste it. i just typed it up at warp speed because i need to get this figured out before 4 today. there aren't any mistyped statements in the real code. and as for the answer you gave me for the first problem...thanks but i didn't need it anymore.
|
Re: C Programming Question
does anyone else have any suggestions for a solution? like i said, i MUST get this down by 4 today. i've spent all yesterday (6+ hours) and now today (another 6+ hours) on this thing. our robot will be up and running very soon and i want to try to tweak the autonomous as much as possible and as of now, i can't even figure out how to create an autonomous mode. :(
|
Re: C Programming Question
man...nm...i forgot to post it but i got the solution. pay no head to this thread now.
|
| All times are GMT -5. The time now is 01:42. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi