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 all commits
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
3 changes: 3 additions & 0 deletions ROMFS/px4fmu_common/init.d/rc.sensors
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ fi

if ver hwcmp NXPHLITE_V3
then
# External I2C bus
hmc5883 -C -T -X start

# Internal I2C (baro)
mpl3115a2 -I start

Expand Down
13 changes: 9 additions & 4 deletions ROMFS/px4fmu_common/init.d/rcS
Original file line number Diff line number Diff line change
Expand Up @@ -389,10 +389,10 @@ then
fi
# waypoint storage
# REBOOTWORK this needs to start in parallel
if dataman start $DATAMAN_OPT
then
fi
unset DATAMAN_OPT
#if dataman start $DATAMAN_OPT
#then
#fi
#unset DATAMAN_OPT

#
# Sensors System (start before Commander so Preflight checks are properly run)
Expand Down Expand Up @@ -967,6 +967,11 @@ then

sh /etc/init.d/rc.logging

if dataman start $DATAMAN_OPT
then
fi
unset DATAMAN_OPT

# End of autostart
fi

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

#ifdef CONFIG_ARCH_BOARD_NXPHLITE_V3
sensor_is_onboard = false;
new_report.is_external = true;
#endif

if (sensor_is_onboard) {
// convert onboard so it matches offboard for the
// scaling below
Expand Down Expand Up @@ -1440,9 +1445,13 @@ struct hmc5883_bus_option {
#ifdef PX4_I2C_BUS_EXPANSION2
{ HMC5883_BUS_I2C_EXTERNAL, "/dev/hmc5883_ext2", &HMC5883_I2C_interface, PX4_I2C_BUS_EXPANSION2, NULL },
#endif
#ifdef PX4_I2C_BUS_ONBOARD

#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 },
#endif

#ifdef PX4_SPIDEV_HMC
{ HMC5883_BUS_SPI, "/dev/hmc5883_spi", &HMC5883_SPI_interface, PX4_SPI_BUS_SENSORS, NULL },
#endif
Expand Down