1
0
mirror of https://github.com/thooge/esp32-nmea2000-obp60.git synced 2025-12-14 06:23:07 +01:00

correct handling for grove based iic sensors

This commit is contained in:
andreas
2024-03-21 11:51:10 +01:00
parent 99d7484afb
commit b091d9aee4
8 changed files with 73 additions and 54 deletions

View File

@@ -22,11 +22,12 @@ class SensorBase{
int busId=0;
int iid=99; //N2K instanceId
int addr=-1;
String prefix;
const String prefix;
const String type;
long intv=0;
bool ok=false;
virtual void readConfig(GwConfigHandler *cfg)=0;
SensorBase(GwApi *api,const String &prfx):prefix(prfx){
SensorBase(const String &tn,GwApi *api,const String &prfx):type(tn),prefix(prfx){
}
using Creator=std::function<SensorBase<BUS> *(GwApi *api,const String &prfx)>;
virtual bool isActive(){return false;};