DriveTrain/EncodeDistance created

fixed and refurbished the update function.