|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools |
Rating:
|
Display Modes |
|
#12
|
|||
|
|||
|
Variables Change randomly
PLEASE I CANNOT TAKE THIS ANYMORE
Any functions I create return seemingly random numbers for example I put the function unsigned int Motor_Limit (int motor) { static unsigned int lmnewmotor; if(motor >= 254) { lmnewmotor = 254; } if(motor <= 0) { lmnewmotor = 0; } } In ifi_code.c and a prototype in ifi_code.h. I call it with motor1 = Motor_Limit((int) motor1); where motor1 is a pwm value that may be invalid. IT ALWAYS RETURNS 1919!!!! WHYYYYYYYYYY Is this a bug, I have the sensors version and kevin's site said that it was relatively bug free. We have a demo tomorrow and whenever I try to run my code the robot goes int a spasm. |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Does the camera code suits to all versions of MPLAB and C18? | razer | Programming | 3 | 04-01-2007 14:50 |
| Trying to follow C18 interrupt context code... | dcbrown | Programming | 5 | 21-12-2006 09:01 |
| Error w/ FRC code | JamesBrown | Programming | 2 | 08-01-2005 16:17 |
| Programming code Fix FRC | Ferazel2001 | Programming | 6 | 08-02-2004 02:46 |
| FRC default code | hedgehogger | Programming | 2 | 21-01-2004 18:41 |