Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DO NOT MERGE] Nxphlite temporary fixes #9504

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/drivers/boards/nxphlite-v3/board_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,6 @@ __BEGIN_DECLS

#define PX4_I2C_BUS_EXPANSION PX4_BUS_NUMBER_TO_PX4(0)
#define PX4_I2C_BUS_ONBOARD PX4_BUS_NUMBER_TO_PX4(1)
#define PX4_I2C_BUS_ONBOARD_EXP 1

#define PX4_I2C_BUS_LED PX4_I2C_BUS_EXPANSION

Expand Down
4 changes: 2 additions & 2 deletions src/drivers/magnetometer/hmc5883/hmc5883.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -989,7 +989,7 @@ HMC5883::collect()
sensor_is_onboard = !_interface->ioctl(MAGIOCGEXTERNAL, dummy);
new_report.is_external = !sensor_is_onboard;

#ifdef PX4_I2C_BUS_ONBOARD_EXP
#ifdef CONFIG_ARCH_BOARD_NXPHLITE_V3
Copy link
Member

@davids5 davids5 Jun 21, 2018

Choose a reason for hiding this comment

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

@DanielePettenuzzo I know this is a DNM HACK but just for the record we alway avoid any CONFIG_ARCH_BOARD_xxxx in common code. The thinking is name it as a feature and if def on that. See

sensor_is_onboard = false;
new_report.is_external = true;
#endif
Expand Down Expand Up @@ -1446,7 +1446,7 @@ struct hmc5883_bus_option {
{ HMC5883_BUS_I2C_EXTERNAL, "/dev/hmc5883_ext2", &HMC5883_I2C_interface, PX4_I2C_BUS_EXPANSION2, NULL },
#endif

#if PX4_I2C_BUS_ONBOARD_EXP == 1
#ifdef CONFIG_ARCH_BOARD_NXPHLITE_V3
{ HMC5883_BUS_I2C_EXTERNAL, "/dev/hmc5883_ext", &HMC5883_I2C_interface, PX4_I2C_BUS_ONBOARD, NULL },
#elif PX4_I2C_BUS_ONBOARD
{ HMC5883_BUS_I2C_INTERNAL, "/dev/hmc5883_int", &HMC5883_I2C_interface, PX4_I2C_BUS_ONBOARD, NULL },
Expand Down