1
0
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:
andreas
2024-11-19 18:58:29 +01:00
parent d904d15ece
commit 0200352f91
13 changed files with 51 additions and 37 deletions

View File

@@ -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