diff --git a/src/configuration.h b/src/configuration.h index 72420cc59..349bd2870 100644 --- a/src/configuration.h +++ b/src/configuration.h @@ -124,7 +124,8 @@ along with this program. If not, see . #define INA3221_ADDR 0x42 #define QMC6310_ADDR 0x1C #define QMI8658_ADDR 0x6B -#define QMC5883L_ADDR 0x1E +#define QMC5883L_ADDR 0x0D +#define HMC5883L_ADDR 0x1E #define SHTC3_ADDR 0x70 #define LPS22HB_ADDR 0x5C #define LPS22HB_ADDR_ALT 0x5D @@ -331,4 +332,4 @@ along with this program. If not, see . #endif #include "DebugConfiguration.h" -#include "RF95Configuration.h" \ No newline at end of file +#include "RF95Configuration.h" diff --git a/src/detect/ScanI2C.h b/src/detect/ScanI2C.h index 743de7a9a..090b1a968 100644 --- a/src/detect/ScanI2C.h +++ b/src/detect/ScanI2C.h @@ -36,6 +36,7 @@ class ScanI2C QMC6310, QMI8658, QMC5883L, + HMC5883L, PMSA0031, MPU6050, LIS3DH, @@ -118,4 +119,4 @@ class ScanI2C private: bool shouldSuppressScreen = false; -}; \ No newline at end of file +}; diff --git a/src/detect/ScanI2CTwoWire.cpp b/src/detect/ScanI2CTwoWire.cpp index 48341034b..f09eb3b95 100644 --- a/src/detect/ScanI2CTwoWire.cpp +++ b/src/detect/ScanI2CTwoWire.cpp @@ -382,6 +382,7 @@ void ScanI2CTwoWire::scanPort(I2CPort port, uint8_t *address, uint8_t asize) break; SCAN_SIMPLE_CASE(QMC5883L_ADDR, QMC5883L, "QMC5883L Highrate 3-Axis magnetic sensor found\n") + SCAN_SIMPLE_CASE(HMC5883L_ADDR, HMC5883L, "HMC5883L 3-Axis digital compass found\n") SCAN_SIMPLE_CASE(PMSA0031_ADDR, PMSA0031, "PMSA0031 air quality sensor found\n") SCAN_SIMPLE_CASE(MPU6050_ADDR, MPU6050, "MPU6050 accelerometer found\n"); diff --git a/src/main.cpp b/src/main.cpp index df90c4722..2c8c0dcb8 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -560,6 +560,7 @@ void setup() SCANNER_TO_SENSORS_MAP(ScanI2C::DeviceType::QMC6310, meshtastic_TelemetrySensorType_QMC6310) SCANNER_TO_SENSORS_MAP(ScanI2C::DeviceType::QMI8658, meshtastic_TelemetrySensorType_QMI8658) SCANNER_TO_SENSORS_MAP(ScanI2C::DeviceType::QMC5883L, meshtastic_TelemetrySensorType_QMC5883L) + SCANNER_TO_SENSORS_MAP(ScanI2C::DeviceType::HMC5883L, meshtastic_TelemetrySensorType_QMC5883L) SCANNER_TO_SENSORS_MAP(ScanI2C::DeviceType::PMSA0031, meshtastic_TelemetrySensorType_PMSA003I) SCANNER_TO_SENSORS_MAP(ScanI2C::DeviceType::RCWL9620, meshtastic_TelemetrySensorType_RCWL9620) SCANNER_TO_SENSORS_MAP(ScanI2C::DeviceType::VEML7700, meshtastic_TelemetrySensorType_VEML7700) @@ -1144,4 +1145,4 @@ void loop() } // if (didWake) LOG_DEBUG("wake!\n"); } -#endif \ No newline at end of file +#endif