Transfering from Autonomous to User Control

At the last competition we encountered issues with convex failing to transfer smoothly from autonomous to user control. Auton would run as written and then if would see the interrupt to stop auton. Once the autonomous score is counted and the game is restarted out robot fails to move. Initially all of the leds blink green, but within a second the robot LED turns to a slow red blink. I managed to get a output of the task’s when this happens and the output is below. The current work around if to turn on the robot wait for the key to turn blue and then turn on the remote unplugged from competition control then wait for them to connect and then connect to competition to control. The only problem with this is that sometimes the problems still persisted. We see this problem with both our full auton program and an auton program with nothing inside it besides the required calls from the template found for convex. Anyone have an idea for a quick fix on this (JPearmen? :slight_smile:
image1.JPG

You have something in the code that’s crashing the cortex, perhaps the stack is not large enough or something like that, send me the project.

Not a problem I have been going a little crazy over this issue for the last couple of weeks.
Failuredotcom.zip (26.6 MB)

Don’t call vexGyroInit from the operator task. vexGyroInit will create a new task, calling it multiple times (which can happen when plugging into field control) will try and create the task more than once, unlike RobotC ,most RTOS are not tolerant to that. If you really need to reset the gyro at beginning of operator then call vexGyroInit in vexUserInit (which you seem to have removed) and then use vexGyroReset() at the beginning of operator.

Ok that makes a lot of sense. I have a slightly new problem now. I moved the function to vexUserSetUp in a little bit of a haste. It fixed the problem for about five or six power cycles and then the brain shut off and refused to turn back on. Do you think it could have caused that? (No hard feelings I’m the idiot user.) I just don’t want to cause it to happen again.

It appears to be a cold solder joint from the battery connector to the board I will now more in about five minutes when I get the brain out of the robot.

Well I’m pretty lost on that one. It will power up over usb but now over battery. Switch, battery connector, regulator all look fine. So characteristic smell. :confused: