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

intermediate: simplify task interfaces

This commit is contained in:
andreas
2024-11-16 17:43:21 +01:00
parent 85e1a0e5f0
commit 56518d9309
6 changed files with 31 additions and 105 deletions

View File

@@ -65,7 +65,7 @@ static void addGroveItems(std::vector<IICSensorBase::Creator> &creators,GwApi *a
if (scfg->ok)
{
LOG_DEBUG(GwLog::LOG, "adding %s from grove config", prfx.c_str());
sensors.add(api, scfg);
sensors.add(api, SensorBase::Ptr(scfg));
found=true;
break;
}

View File

@@ -1,6 +1,12 @@
#ifndef _GWIICTASK_H
#define _GWIICTASK_H
#include "GwApi.h"
#include "GwSensor.h"
void initIicTask(GwApi *api);
DECLARE_INITFUNCTION(initIicTask);
class IICSensors : public GwApi::TaskInterfaces::Base{
public:
SensorList sensors;
};
DECLARE_TASKIF(IICSensors);
#endif