Closed thefangbear closed 8 years ago
Also after adding while loop robot started behaving mysterious under teleOperated. It will actually move without any control during teleoperated which I think will be the dilemma of multithreading; the thread of autonomous hasn't been actually stopped before teleoperated had started which results in autonomous still running, caused by the extra while loop
It will actually move without any control during teleoperated
I'm scared
It tried to kill you, it also tried to kill me to day. On Wed, Feb 3, 2016 at 21:57 Mark Bense notifications@github.com wrote:
It will actually move without any control during teleoperated
I'm scared
— Reply to this email directly or view it on GitHub https://github.com/team5181/2016Robot/issues/26#issuecomment-179591218.
Recorder now works; see commit: https://github.com/team5181/2016Robot/commit/bbc713533384366dc2f3e9ff4c3b7abc40a78ab3
So Connor and I figured out sth in run() caused the delay of code execution in autonomous. Tomorrow we must figure out a way to time the delay and define timeStep variable. The problem is 1) where it is happening 2) is the actual delay arithmetic ( which means a static value or a static value of increase will solve the problem or geometric (exponential? This well explains why the robot will be relative slow at first and relatively fast in the end. The problem is after we added an additional while() loop in run() it actually disappeared. Not to mention that 3) the Thread.sleep() actually shuts autonomous down for timeStep amount of time and actually hampers the robot from general execution. So Connor added a while loop using timeStep to execute the code timeStep times to solve the problem, and Thread.sleep() is set to one miliseconds. The problem is 1 is still too high however if we comment the entire Thread.sleep out it becomes too fast. Therefore a Delay timing method is needed.