Fix AK8963 SPI mag support#2538
Conversation
Fix and simplify AK8963/MPU9250 mag gain calculation and switch to 16bit mode Fix AK8963 overflow issue (mag will stop updating if an overflow happens) AlienFlightNG target updates
|
This PR replaces #2424 wich got obsoleted by the massive driver updates from #2275. I hope it will get now merged before getting obsolete again. This code is successfully tested with the AlienFlightNG F7 Anubis16 (ICM20602 SPI/AK8963 SPI), the AlienFlightNG F7 development board (MPU9250 SPI) and the SPRacing F3 Mini (MPU9250 I2C). |
|
|
||
| #if defined(USE_MAG_AK8963) | ||
| #if defined(AK8963_SPI_BUS) | ||
| BUSDEV_REGISTER_SPI(busdev_ak8963, DEVHW_AK8963, AK8963_SPI_BUS, AK8963_CS_PIN, NONE, DEVFLAGS_NONE); |
There was a problem hiding this comment.
Can AK8963 be on native SPI? I though it's only I2C sensor
There was a problem hiding this comment.
It can be I2C or SPI, The AlienFlightNG Anubis16 is an example for SPI:
https://www.alienflightng.com/flight-controllers/f7-anubis16/
We have two more FC's in planning with this combination. The HMC5338 is EOL, is not produced anymore and will get unavailable soon. So the AK8963 likely will show up more often.
|
Good stuff @MJ666! |
Fix and simplify AK8963/MPU9250 mag gain calculation and switch to 16bit mode
Fix AK8963 overflow issue (mag will stop updating if an overflow happens)
AlienFlightNG target updates