mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-11-29 16:06:57 -05:00
sht4x support,, typo fix (#2843)
This commit is contained in:
parent
b739dd883c
commit
3b57672dda
5 changed files with 126 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue