mirror of
https://github.com/thooge/esp32-nmea2000-obp60.git
synced 2025-12-15 06:53:07 +01:00
intermediate, untested: move creator to SensorBase
This commit is contained in:
@@ -146,10 +146,10 @@ class BME280Config : public IICSensorBase{
|
||||
}
|
||||
};
|
||||
|
||||
static IICSensorBase::Creator creator([](GwApi *api, const String &prfx){
|
||||
static SensorBase::Creator creator([](GwApi *api, const String &prfx){
|
||||
return new BME280Config(api,prfx);
|
||||
});
|
||||
IICSensorBase::Creator registerBME280(GwApi *api){
|
||||
SensorBase::Creator registerBME280(GwApi *api){
|
||||
#if defined(GWBME280) || defined(GWBME28011)
|
||||
{
|
||||
api->addSensor(creator(api,PRFX1));
|
||||
@@ -181,8 +181,8 @@ IICSensorBase::Creator registerBME280(GwApi *api){
|
||||
return creator;
|
||||
}
|
||||
#else
|
||||
IICSensorBase::Creator registerBME280(GwApi *api){
|
||||
return IICSensorBase::Creator();
|
||||
SensorBase::Creator registerBME280(GwApi *api){
|
||||
return SensorBase::Creator();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user