Added online mode (just the same algorithm, just with a bool if the motors get a signal)