mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-12-06 08:32:07 +00:00
sht4x support,, typo fix (#2843)
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
#include "i2cdev_ads1110.hpp"
|
||||
#include "i2cdev_bh1750.hpp"
|
||||
#include "i2cdev_ppmod.hpp"
|
||||
#include "i2cdev_sht4x.hpp"
|
||||
|
||||
namespace i2cdev {
|
||||
|
||||
@@ -73,6 +74,11 @@ bool I2CDevManager::found(uint8_t addr) {
|
||||
if (!item.dev->init(addr)) item.dev = nullptr;
|
||||
}
|
||||
|
||||
if (!item.dev && (addr == I2CDEV_SHT4X_ADDR_1 || addr == I2CDEV_SHT4X_ADDR_2)) {
|
||||
item.dev = std::make_unique<I2cDev_SHT4x>();
|
||||
if (!item.dev->init(addr)) item.dev = nullptr;
|
||||
}
|
||||
|
||||
if (!item.dev && (addr == I2CDEV_MAX17055_ADDR_1)) {
|
||||
item.dev = std::make_unique<I2cDev_MAX17055>();
|
||||
if (!item.dev->init(addr)) item.dev = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user