mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-27 11:53:34 +08:00
sensors (accel/gyro/mag) determine if external with device id
This commit is contained in:
@@ -48,7 +48,6 @@ HMC5883::HMC5883(device::Device *interface, const I2CSPIDriverConfig &config) :
|
||||
_temperature_counter(0),
|
||||
_temperature_error_count(0)
|
||||
{
|
||||
_px4_mag.set_external(_interface->external());
|
||||
}
|
||||
|
||||
HMC5883::~HMC5883()
|
||||
@@ -367,7 +366,7 @@ int HMC5883::collect()
|
||||
* to align the sensor axes with the board, x and y need to be flipped
|
||||
* and y needs to be negated
|
||||
*/
|
||||
if (!_px4_mag.external()) {
|
||||
if (!_interface->external()) {
|
||||
// convert onboard so it matches offboard for the
|
||||
// scaling below
|
||||
report.y = -report.y;
|
||||
|
||||
Reference in New Issue
Block a user