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:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user