|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools |
Rating:
|
Display Modes |
|
#13
|
||||
|
||||
|
Re: Stupidest Programming Mistakes
We've had QUITE a few:
to convert angle radians to degrees: int tiltdeg = tiltrad*( (int)3.14 / 180 ); hmmm, no wonder why we kept getting "0" as a tile angle... and oh yeah, it shoulda been 180/3.14 to begin with... In trying to comment stuff out with "/* */", we realize that we comment out other stuff already commented out using the same method, and whenever it reached that comment's "*/" it would end, causing a bunch of syntax errors throughout the rest of the uncommented code, and we couldnt figure out for the life of us why it was reading that code... and dont know what we were thinking here: if(TILT_SERVO > Tilt_Servo_Max) TILT_SERVO = Tilt_Servo_Max - Tilt_Servo_Min + Step_Size; um, I think we were trying to have the camera search in the last area it saw the light if it immediately loses it too high...but um.. Tilt_Servo_Min = 0 and Step_Size is greater than 0... |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Programming Vex w/ MPLab | dababyjebus | FIRST Tech Challenge | 27 | 25-04-2008 09:11 |
| Programming - Getting Started | Mark McLeod | Programming | 80 | 16-04-2008 23:37 |
| VEX programming | Gene F | Programming | 14 | 08-08-2006 22:21 |
| Suggestion for Delphi Programming Posts | Chris Hibner | CD Forum Support | 1 | 27-07-2005 10:02 |
| Robot Programming Education | phrontist | Programming | 11 | 03-05-2004 07:32 |