mirror of
https://github.com/thooge/esp32-nmea2000-obp60.git
synced 2025-12-14 06:23:07 +01:00
handle multiple groves for iic
This commit is contained in:
@@ -28,6 +28,7 @@ class SensorBase{
|
||||
virtual void readConfig(GwConfigHandler *cfg)=0;
|
||||
SensorBase(GwApi *api,const String &prfx):prefix(prfx){
|
||||
}
|
||||
using Creator=std::function<SensorBase<BUS> *(GwApi *api,const String &prfx)>;
|
||||
virtual bool isActive(){return false;};
|
||||
virtual bool initDevice(GwApi *api,BUS *wire){return false;};
|
||||
virtual bool preinit(GwApi * api){return false;}
|
||||
@@ -46,6 +47,7 @@ class SensorList : public std::vector<SensorBase<BUS>*>{
|
||||
using std::vector<SensorBase<BUS>*>::vector;
|
||||
};
|
||||
|
||||
|
||||
#define CFG_GET(name,prefix) \
|
||||
cfg->getValue(name, GwConfigDefinitions::prefix ## name)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user