Skip to content

Commit 612aa66

Browse files
authored
Merge pull request #2075 from pcmoore/working-ina3221
RFE: allow for INA3221 macro overrides in platform.io files
2 parents f2b61f1 + 913a27d commit 612aa66

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/helpers/sensors/EnvironmentSensorManager.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,15 @@ LPS22HBClass LPS22HB(*TELEM_WIRE);
6262
#endif
6363

6464
#if ENV_INCLUDE_INA3221
65+
#ifndef TELEM_INA3221_ADDRESS
6566
#define TELEM_INA3221_ADDRESS 0x42 // INA3221 3 channel current sensor I2C address
67+
#endif
68+
#ifndef TELEM_INA3221_SHUNT_VALUE
6669
#define TELEM_INA3221_SHUNT_VALUE 0.100 // most variants will have a 0.1 ohm shunts
70+
#endif
71+
#ifndef TELEM_INA3221_NUM_CHANNELS
6772
#define TELEM_INA3221_NUM_CHANNELS 3
73+
#endif
6874
#include <Adafruit_INA3221.h>
6975
static Adafruit_INA3221 INA3221;
7076
#endif

0 commit comments

Comments
 (0)