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

continue restructuring sensors, test env3

This commit is contained in:
andreas
2024-11-25 18:20:34 +01:00
parent 243c20c468
commit 7a7068e77c
9 changed files with 127 additions and 139 deletions

View File

@@ -61,6 +61,8 @@ class SensorTemplate : public SensorBase{
if (busType != bt) return;
measure(api,(BUS*)bus,counterId);
};
protected:
virtual void measure(GwApi *api,BUS *bus, int counterId)=0;
};
@@ -124,7 +126,8 @@ class GwSensorConfigInitializerList : public GwInitializer<GwSensorConfig<T>>::L
#define GWSENSORCONFIG(list,type,prefix,initFunction) \
GwSensorConfigInitializer<type> __init ## type ## prefix(list,GwSensorConfig<type>(#prefix,initFunction));
#define GWSENSORDEF(list,type,init,prefix,bus,baddr) \
GWSENSORCONFIG(list, type, prefix, [](type *s, GwConfigHandler *cfg) { init(s, prefix, bus, baddr); });
#define CFG_GET(name,prefix) \