|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Re: Robot not doing what we need it to, and printfs aren't working
The only uncommented printf is: printf("IFI User Processor Initialized ...\r\n");
The other ones are commented out. Does that error have a line number with it? |
|
#2
|
||||
|
||||
|
Re: Robot not doing what we need it to, and printfs aren't working
All of them give the error (when they are uncommented)
I commented most of them out when I started running into the error, as commenting them out gave me less errors, and made me happier. I kept t one so I knew when I had fixed it (which hasn't happened, of course). |
|
#3
|
||||
|
||||
|
Re: Robot not doing what we need it to, and printfs aren't working
Which line does it say that error is on?
|
|
#4
|
||||||
|
||||||
|
Re: Robot not doing what we need it to, and printfs aren't working
In your tank function, you don't set any PWM values, therefore the PWMs will still be what they were before the function was called. When you first turn the robot on, it won't move. Once the PWMs get set in the mecanum function, they will continue with the same value once you start calling the tank function again.
In the mecanum function, the calculations can very easily overflow a char. You'll need to protect against that. I don't know if that is the only problem, but it will definitely cause you problems. |
|
#5
|
|||
|
|||
|
Re: Robot not doing what we need it to, and printfs aren't working
And while you are at it, can you post the entire error message(s)?
|
|
#6
|
|||||
|
|||||
|
Re: Robot not doing what we need it to, and printfs aren't working
Your print statements have mixed types where you attempt to print unsigned char (e.g., pwm01) and double (wFL) types as ints (%d). Typecast the arguments (int).
Statements such as: pwm01 = (int)wFL + 127; start with a double, typecast it to int, then assign it to unsigned char as opposed to keeping your calculation as double then typecasting the result to unsigned char. Are you doing that to speed things up? Just curious, not a problem. Last edited by Mark McLeod : 18-09-2008 at 08:37. |
|
#7
|
||||
|
||||
|
Re: Robot not doing what we need it to, and printfs aren't working
The printf line (unsure specific number, but that line).
I don't have the entire error anymore, but it said the error was "type qualifier mismatch in assignment" on the printf line in teleop.c. Quote:
That being said, this is almost the exact same mechanum code we used at the competition. It should work, but it isn't. How would we stop it from overflowing the chars? Quote:
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Need some help with arm not working... | neilcooper | Programming | 3 | 15-03-2008 06:16 |
| If the computer and internet was not invented, what would you be doing right now? | Bharat Nain | Chit-Chat | 55 | 03-06-2006 11:55 |
| my comp is not working right and i need help | Timmyd | Chit-Chat | 17 | 07-11-2005 23:39 |
| Camera not working when connected to robot | MarkVH | Programming | 5 | 14-02-2005 15:40 |
| Robot Controller Not Working !?!?! | Team1425 | Electrical | 3 | 24-01-2004 20:52 |