Hall effect Sensor (skip calibration)

@Marc_O - I’ve spotted and fixed a bug in the hall sensor that only happens if sensor_direction is CCW. So there is a 50% chance of being affected and if you are affected it mostly affects angle control mode I think. The change is on the dev branch.

I’m hoping this will mean that hall sensors behave better for all now. The 3x Halls sensors can be arranged in 6 ways but when you look at a repeating sequence of commutations there are only two permutations (ABC and CBA).

ABC - ABCabc
ACB - aCBAcb
BAC - baCBAc
BCA - bcABCa
CAB - cABCab
CBA - CBAcba

To test my fix - I tried switching hall A for C (which should have put me on the other CBA permutation). The only thing I noticed was that the sensor_direction changed. Similarly if I change the motor phase leads A and C I also see the sensor_direction changing. In all 4 motor/hall permutations I can automatically calibrate and movement is stable.

TLDR - I’m very much hoping that we’ve got a generalised hall sensor implementation and that your ‘polarity’ fix isn’t needed. I think your polarity was needed because of the CCW bug I fixed on dev. It it turns out we do need your polarity fix then a) I don’t understand hall sensors and b) we’ll have to find a way to detect polarity during calibration.

Your changes and persistence has really helped me improve the hall sensor implementation, thanks!