sensors (accel/gyro/mag) determine if external with device id

This commit is contained in:
Daniel Agar
2022-01-10 10:31:07 -05:00
committed by GitHub
parent 45040be669
commit e731fcdbc0
36 changed files with 187 additions and 205 deletions
+1 -2
View File
@@ -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;