mirror of
https://github.com/thooge/esp32-nmea2000-obp60.git
synced 2026-03-28 18:06:37 +01:00
Integrate many changes from master
This commit is contained in:
@@ -9,6 +9,9 @@ class QMP6988Config : public IICSensorBase{
|
||||
public:
|
||||
String prNam="Pressure";
|
||||
bool prAct=true;
|
||||
bool sEnv=true;
|
||||
tN2kTempSource tmSrc=tN2kTempSource::N2kts_InsideTemperature;
|
||||
tN2kHumiditySource huSrc=tN2kHumiditySource::N2khs_Undef;
|
||||
tN2kPressureSource prSrc=tN2kPressureSource::N2kps_Atmospheric;
|
||||
float prOff=0;
|
||||
QMP6988 *device=nullptr;
|
||||
@@ -39,6 +42,7 @@ class QMP6988Config : public IICSensorBase{
|
||||
float computed=pressure+prOff;
|
||||
LOG_DEBUG(GwLog::DEBUG,"%s measure %2.0fPa, computed %2.0fPa",prefix.c_str(), pressure,computed);
|
||||
sendN2kPressure(api,*this,computed,counterId);
|
||||
sendN2kEnvironmentalParameters(api,*this,N2kDoubleNA,N2kDoubleNA,computed,counterId);
|
||||
}
|
||||
|
||||
|
||||
@@ -90,6 +94,7 @@ SensorBase::Creator registerQMP6988(GwApi *api){
|
||||
CFG_SGET(s,prAct,prefix); \
|
||||
CFG_SGET(s,intv,prefix); \
|
||||
CFG_SGET(s,prOff,prefix); \
|
||||
CFG_SGET(s,sEnv,prefix); \
|
||||
s->busId = bus; \
|
||||
s->addr = baddr; \
|
||||
s->ok = true; \
|
||||
@@ -108,4 +113,4 @@ SC6988(QMP698822,2,112);
|
||||
SensorBase::Creator registerQMP6988(GwApi *api){
|
||||
return SensorBase::Creator();
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user