task autonomous() // main task basically, but this will run if we are put itno autonomous mode { MVR = 77; MVL = 77; resetTimer(T2); while (true) { change = full; if (time1[T1]>200) { Speed(); resetTimer(T1); SensorValue[LeftSpeed] = 0; SensorValue[RightSpeed] = 0; Pid(); } change = full; flyWheelRun(); if (time1[T2]>2000) { Staggershot(); } } }
task usercontrol() // main task but for driver mode. { while (true) { startTask(Pid); startTask(SpeedControls); Drive(); Intake(); flyWheelRun(); Pnumatics(); } }
task usercontrol() // main task but for driver mode. { while (true) { if (time1[T1]>200) { Speed(); resetTimer(T1); SensorValue[LeftSpeed] = 0; SensorValue[RightSpeed] = 0; if (time1[T4]>1000) { Pid(); } } Drive(); Intake(); flyWheelRun(); Pnumatics(); SpeedControls(); SpeedControls2(); } }