the simple FOC library is great - no doubt. But - after working some days and digging deeper if found, that here is a bug in the MT6701 I2C-read function, I will explain this more precisely later on. Nevertheless, with the current version i was not able to get sensful results from the sensor, With some changes in the bit_masking it works fine now. I will come back with details soon, this should be treated just as a warning notice for the meantime.
My conclusion was: The bit mask / shift masks are incorrect. High part or MT6701 result contains upper 8 bit and the remaining 6bit are in Positions 7…2.
Just reading both bytes, building the 16 bit word and shift ( >>2 ). Result is 14 bits,
this works fine to me. Because for the meantime i will always use the MT6701, i’ve hardcoded this 2…3 lines in a quite dirty way… but with a good result at the end …
Regards Michael.