angle sensor code updated