|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools |
Rating:
|
Display Modes |
|
|
|
#1
|
||||
|
||||
|
Re: Stupidest Programming Mistakes
i loaded the defualt code from last year, and the robot just started going. It ran into a table and knocked everything over. Luckly it wasnt facing the otherway becasue it would have went down the road.
|
|
#2
|
|||
|
|||
|
Quote:
![]() |
|
#3
|
|||||
|
|||||
|
Re: Stupidest Programming Mistakes
The stupidest programming mistake:
Assuming the programmer is driving. |
|
#4
|
||||
|
||||
|
Re: Stupidest Programming Mistakes
Worst ones I've seen on our team:
1. Our variation of "when robots attack", when someone re-routed the shaft encoder harness to where one of the CIM motor chains could suck it in, resulting in one of the shaft encoders zeroing out while the other incremented, causing a wild spiral while folks are falling over themselves to hit the disable switch on the OI. 2. Various spastic responses from leaving the backup battery off the bot and having the motors draw enough current to reset the RC, causing very, spastic results. |
|
#5
|
||||
|
||||
|
Re: Stupidest Programming Mistakes
We've had one major error that took -forever- to figure out.
We had this cubic function for the drive system, since it would increase slower... And it built and all, but when we loaded it an error popped up in the IFI command prompt, all in HEX. It took a while until we realized that victors couldn't take floats @.@ Then we had to change our step(which works very well now, speeds up slowly then stops fast, speeds in reverse slowly but goes to 127 again fast.) from .8 to 1 =P All is good now... also we decided to move our autonomous code to a new file, and leave manual in another... Only to forget to change this #ifndef __399_Code_h_ in our header file to the name of our Autonomous file @.@ That gave us the same hex error stuff... Oh well! All is good now... Except it seems like our cam is fried. =/... Will be able to test it more tommorow =( EDIT: After reading tons of the messages here, it seems that those hex errors were actually oversized memory? I doubt we have the new IFI loader so eh... I guess maybe we can go back to our cubic. This works good though, so we'll see. Last edited by Brad Voracek : 09-02-2006 at 01:20. |
|
#6
|
|||||
|
|||||
|
Re: Stupidest Programming Mistakes
How about having a programmer delete PutData as "unnecessary" in a code update 2 minutes before a match?
|
|
#7
|
|||
|
|||
|
Re: Stupidest Programming Mistakes
Quote:
...ouch. |
|
#8
|
|||
|
|||
|
Re: Stupidest Programming Mistakes
Well our "programming" errors tend to really not be programming errors at all. One of the more frustrating ones we had this year happened a couple weeks ago. We were testing some code for gyros we are using. Well after two hours of pouring over the code trying to figure out why our printf with the variables wouldnt work we realized that we never tethered the OI to the the robot controller.
|
|
#9
|
|||
|
|||
|
Re: Stupidest Programming Mistakes
My associate programmer decided to add Limit_Mix calls to the equations for joystick input / pwm output. He uploaded the code, but before we tested it he left, and took with him the updated code files (when I asked to get a copy, he uploaded only the .hex file onto my computer for some reason). Apparently he didn't read the Limit_Mix function correctly, because when we fired the robot up and began testing the ball launcher, it started spinning backwards!
In the dilemma that ensued, we reversed the polarity of the motor to get it to spin correctly (though we didn't know what was the original cause at the time). The launcher worked, but then we noticed its speed couldn't be adjusted. Upon reaching home, I looked at the code (we post it onto a team wiki) and found... lo and behold, he forgot to add " + 2000" to the Limit_Mix calls. After fixing this error, I realized how lucky the team was to have remembered to take the drivetrain fuses out before testing the launcher -- all functions calling Limit_Mix were being returned as 0 (FULL REVERSE!). We almost had a mass murdering robot (at least this years robot doesn't have a huge arm like last years -- now that would have been bad). |
|
#10
|
|||||
|
|||||
|
Re: Stupidest Programming Mistakes
just yesterday i made an incredibly stupid mistake
Code:
if(TempCount4BA <= 38)
{
BALL_MOVER = 1;
}
else if((TempCount4BA > 38) && (TempCount4BA <= 78))
{
BALL_MOVER = 0;
TempCount4BA = 0;
}
TempCount4BA++;
|
![]() |
| 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 |