Skip to content

Fix AK8963 SPI mag support#2538

Merged
digitalentity merged 1 commit intoiNavFlight:developmentfrom
AlienFlightINAV:AK8963SPI
Dec 1, 2017
Merged

Fix AK8963 SPI mag support#2538
digitalentity merged 1 commit intoiNavFlight:developmentfrom
AlienFlightINAV:AK8963SPI

Conversation

@MJ666
Copy link
Copy Markdown
Contributor

@MJ666 MJ666 commented Nov 30, 2017

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

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
@MJ666
Copy link
Copy Markdown
Contributor Author

MJ666 commented Nov 30, 2017

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).

@MJ666 MJ666 mentioned this pull request Nov 30, 2017

#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);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can AK8963 be on native SPI? I though it's only I2C sensor

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@digitalentity
Copy link
Copy Markdown
Member

Good stuff @MJ666!

@digitalentity digitalentity merged commit 41af2ce into iNavFlight:development Dec 1, 2017
@digitalentity digitalentity added this to the 1.9 milestone Dec 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants