Hello everyone,
I’ve written a code to use the Keya encoder instead of the steering angle sensor. To synchronize the encoder with the actual wheel angle, I based it on Marek’s idea of automatically zeroing the WAS. My code performs an initial zero at startup and then continuously zeros the encoder based on the GPS and IMU bearings. The tolerances are adjustable via a web interface.
To simplify use, to use WAS mode with the Keya, you must activate Danfoss mode. Deactivating it reverts to normal WAS mode.
The code was initially based on code for Manu’s PCB ECU from the French group. I adapted it for the AIO. Note that some have GPS on serial number 7, others on serial number 2; you’ll need to change it manually.
Testing has been done for a while now, and everything seems to be working without any problems. Code on my GitHub: GitHub - Flodu81/AIO_Keya_WasKeyaFiltre: AOG code to use the Keya encoder as an angle sensor · GitHub