Our girls are wanting to do some more advanced control for their lift mechanism this year (still on cortex). They are looking to use PID to control the lift position for both auton and driver control. We have a PID task written to control the motors, and know how to code the actual control for the buttons, but when we go to start the PID task, it only seems to compile and have no issues when the startTask is placed in the user control section. Since the control was desired in both auton and driver, we tried starting the task in either pre_auton or auton (with the bstoptasksbetweenmodes set to false) and it comes up with errors. It comes up with an error for Undefined variable for the task name , and at the line where the task is actually programmed, the error says duplicate definition for the task name. Its like the cortex thinks the task is a variable. Which doesn’t make sense since if I start the task in the user control, it works just fine with no errors.
Note - I’m without the code right now so I can’t post examples. If desired, I can get some posted when I get home.
I"m sure there is something more I don’t understand about task control in the controller, but anything pointing me to the issue would be helpful. I’m at a loss guiding them to a solution.