Merge pull request #284 from ngavars/main

Telemetry: INA3221 current sensor support for Promicro
This commit is contained in:
ripplebiz 2025-05-14 21:07:22 +10:00 committed by GitHub
commit cf1c863cc2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 122 additions and 5 deletions

View file

@ -2,11 +2,18 @@
#include <CayenneLPP.h>
#define TELEM_PERM_BASE 0x01 // 'base' permission includes battery
#define TELEM_PERM_LOCATION 0x02
#define TELEM_PERM_BASE 0x01 // 'base' permission includes battery
#define TELEM_PERM_LOCATION 0x02
#define TELEM_PERM_ENVIRONMENT 0x04 // permission to access environment sensors
#define TELEM_CHANNEL_SELF 1 // LPP data channel for 'self' device
#define TELEM_INA3221_ADDRESS 0x42 // INA3221 3 channel current, voltage, power sensor I2C address
#define TELEM_INA3221_SHUNT_VALUE 0.100 // most variants will have a 0.1 ohm shunts
#define TELEM_INA3221_SETTING_CH1 "INA3221 Channel 1"
#define TELEM_INA3221_SETTING_CH2 "INA3221 Channel 2"
#define TELEM_INA3221_SETTING_CH3 "INA3221 Channel 3"
class SensorManager {
public:
double node_lat, node_lon; // modify these, if you want to affect Advert location