Merge pull request #811 from fdlamotte/tracker_l1_environment_sensors

Tracker l1: environment sensors
This commit is contained in:
ripplebiz 2025-09-23 15:34:22 +10:00 committed by GitHub
commit 4aa58ade8a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 30 additions and 134 deletions

View file

@ -70,7 +70,7 @@ static Adafruit_INA260 INA260;
#define TELEM_INA226_SHUNT_VALUE 0.100
#define TELEM_INA226_MAX_AMP 0.8
#include <INA226.h>
static INA226 INA226(TELEM_INA226_ADDRESS);
static INA226 INA226(TELEM_INA226_ADDRESS, TELEM_WIRE);
#endif
#if ENV_INCLUDE_MLX90614
@ -108,7 +108,13 @@ bool EnvironmentSensorManager::begin() {
#endif
#if ENV_PIN_SDA && ENV_PIN_SCL
#ifdef NRF52_PLATFORM
Wire1.setPins(ENV_PIN_SDA, ENV_PIN_SCL);
Wire1.setClock(100000);
Wire1.begin();
#else
Wire1.begin(ENV_PIN_SDA, ENV_PIN_SCL, 100000);
#endif
MESH_DEBUG_PRINTLN("Second I2C initialized on pins SDA: %d SCL: %d", ENV_PIN_SDA, ENV_PIN_SCL);
#endif