Skip to content

Commit

Permalink
Merge pull request #4740 from fifieldt/QMC5883L
Browse files Browse the repository at this point in the history
Fix I2C address for QMC5883L.
  • Loading branch information
caveman99 authored Sep 17, 2024
2 parents a511878 + 6f1db6f commit 21eb54e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#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
Expand Down Expand Up @@ -331,4 +332,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#endif

#include "DebugConfiguration.h"
#include "RF95Configuration.h"
#include "RF95Configuration.h"
3 changes: 2 additions & 1 deletion src/detect/ScanI2C.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class ScanI2C
QMC6310,
QMI8658,
QMC5883L,
HMC5883L,
PMSA0031,
MPU6050,
LIS3DH,
Expand Down Expand Up @@ -118,4 +119,4 @@ class ScanI2C

private:
bool shouldSuppressScreen = false;
};
};
1 change: 1 addition & 0 deletions src/detect/ScanI2CTwoWire.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
3 changes: 2 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -1144,4 +1145,4 @@ void loop()
}
// if (didWake) LOG_DEBUG("wake!\n");
}
#endif
#endif

0 comments on commit 21eb54e

Please sign in to comment.