mirror of
https://github.com/thooge/esp32-nmea2000-obp60.git
synced 2025-12-16 07:23:07 +01:00
intermediate: restructure for sensors via API
This commit is contained in:
@@ -86,32 +86,28 @@ IICSensorBase::Creator registerQMP6988(GwApi *api,IICSensorList &sensors){
|
||||
GwLog *logger=api->getLogger();
|
||||
#if defined(GWQMP6988) || defined(GWQMP698811)
|
||||
{
|
||||
QMP6988Config *scfg=new QMP6988Config(api,PRFX1);
|
||||
sensors.add(api,scfg);
|
||||
api->addSensor(new QMP6988Config(api,PRFX1));
|
||||
CHECK_IIC1();
|
||||
#pragma message "GWQMP698811 defined"
|
||||
}
|
||||
#endif
|
||||
#if defined(GWQMP698812)
|
||||
{
|
||||
QMP6988Config *scfg=new QMP6988Config(api,PRFX2);
|
||||
sensors.add(api,scfg);
|
||||
api->addSensor(new QMP6988Config(api,PRFX2));
|
||||
CHECK_IIC1();
|
||||
#pragma message "GWQMP698812 defined"
|
||||
}
|
||||
#endif
|
||||
#if defined(GWQMP698821)
|
||||
{
|
||||
QMP6988Config *scfg=new QMP6988Config(api,PRFX3);
|
||||
sensors.add(api,scfg);
|
||||
api->addSensor(new QMP6988Config(api,PRFX3));
|
||||
CHECK_IIC2();
|
||||
#pragma message "GWQMP698821 defined"
|
||||
}
|
||||
#endif
|
||||
#if defined(GWQMP698822)
|
||||
{
|
||||
QMP6988Config *scfg=new QMP6988Config(api,PRFX4);
|
||||
sensors.add(api,scfg);
|
||||
api->addSensor(new QMP6988Config(api,PRFX4));
|
||||
CHECK_IIC2();
|
||||
#pragma message "GWQMP698822 defined"
|
||||
}
|
||||
@@ -120,7 +116,7 @@ IICSensorBase::Creator registerQMP6988(GwApi *api,IICSensorList &sensors){
|
||||
}
|
||||
|
||||
#else
|
||||
IICSensorBase::Creator registerQMP6988(GwApi *api,IICSensorList &sensors){
|
||||
IICSensorBase::Creator registerQMP6988(GwApi *api){
|
||||
return IICSensorBase::Creator();
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user