As you are familiar with developing software, just try to understand the code in the ebike-app.c of the master branch, or the update_setpoint.c of the HighSpeedMotor fork on github.
That's the part you will need if you want to implement the gearsensor.
If you want to understand how to do the commutation of the BLDC you can find detailed information in the internet, but this is a real deep dive and not necessary for implenting the gearsensor.
Do you have a link to the gearsensor? I guess it just pulls the signal pin to gnd, when a gear shift is detected. So you can use the brake input of the controller to make the middrive motor stop to avoid shifting under full load.racingame wrote: ↑Mar 04, 2018 9:33 amFor example, I'd like to customise your firmware to add support for gearsensor , but how to do it? It has a HIGO connector, so first of all I have no clue where I should plug it to my S12S controller in order for it to work, also I have no clue what kind of data it sends to the controller