adjusment to dynamic boat data
This commit is contained in:
parent
df126c9f34
commit
8a0301fabc
|
@ -1164,7 +1164,6 @@ private:
|
||||||
double WaterTemperature;
|
double WaterTemperature;
|
||||||
if (ParseN2kPGN130310(N2kMsg, SID, WaterTemperature, OutsideAmbientAirTemperature, AtmosphericPressure))
|
if (ParseN2kPGN130310(N2kMsg, SID, WaterTemperature, OutsideAmbientAirTemperature, AtmosphericPressure))
|
||||||
{
|
{
|
||||||
|
|
||||||
updateDouble(boatData->WaterTemperature, WaterTemperature);
|
updateDouble(boatData->WaterTemperature, WaterTemperature);
|
||||||
tNMEA0183Msg NMEA0183Msg;
|
tNMEA0183Msg NMEA0183Msg;
|
||||||
|
|
||||||
|
@ -1179,13 +1178,13 @@ private:
|
||||||
}
|
}
|
||||||
int i=0;
|
int i=0;
|
||||||
GwXDRFoundMapping mapping=xdrMappings->getMapping(XDRTEMP,N2kts_OutsideTemperature,0,0);
|
GwXDRFoundMapping mapping=xdrMappings->getMapping(XDRTEMP,N2kts_OutsideTemperature,0,0);
|
||||||
if (!mapping.empty){
|
if (updateDouble(&mapping,OutsideAmbientAirTemperature)){
|
||||||
LOG_DEBUG(GwLog::DEBUG+1,"found temperature mapping %s",mapping.definition->toString().c_str());
|
LOG_DEBUG(GwLog::DEBUG+1,"found temperature mapping %s",mapping.definition->toString().c_str());
|
||||||
addToXdr(mapping.buildXdrEntry(OutsideAmbientAirTemperature));
|
addToXdr(mapping.buildXdrEntry(OutsideAmbientAirTemperature));
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
mapping=xdrMappings->getMapping(XDRPRESSURE,N2kps_Atmospheric,0,0);
|
mapping=xdrMappings->getMapping(XDRPRESSURE,N2kps_Atmospheric,0,0);
|
||||||
if (!mapping.empty){
|
if (updateDouble(&mapping,AtmosphericPressure)){
|
||||||
LOG_DEBUG(GwLog::DEBUG+1,"found pressure mapping %s",mapping.definition->toString().c_str());
|
LOG_DEBUG(GwLog::DEBUG+1,"found pressure mapping %s",mapping.definition->toString().c_str());
|
||||||
addToXdr(mapping.buildXdrEntry(AtmosphericPressure));
|
addToXdr(mapping.buildXdrEntry(AtmosphericPressure));
|
||||||
i++;
|
i++;
|
||||||
|
@ -1206,19 +1205,19 @@ private:
|
||||||
}
|
}
|
||||||
int i=0;
|
int i=0;
|
||||||
GwXDRFoundMapping mapping=xdrMappings->getMapping(XDRTEMP,TempSource,0,0);
|
GwXDRFoundMapping mapping=xdrMappings->getMapping(XDRTEMP,TempSource,0,0);
|
||||||
if (!mapping.empty){
|
if (updateDouble(&mapping,Temperature)){
|
||||||
LOG_DEBUG(GwLog::DEBUG+1,"found temperature mapping %s",mapping.definition->toString().c_str());
|
LOG_DEBUG(GwLog::DEBUG+1,"found temperature mapping %s",mapping.definition->toString().c_str());
|
||||||
addToXdr(mapping.buildXdrEntry(Temperature));
|
addToXdr(mapping.buildXdrEntry(Temperature));
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
mapping=xdrMappings->getMapping(XDRHUMIDITY,HumiditySource,0,0);
|
mapping=xdrMappings->getMapping(XDRHUMIDITY,HumiditySource,0,0);
|
||||||
if (!mapping.empty){
|
if (updateDouble(&mapping,Humidity)){
|
||||||
LOG_DEBUG(GwLog::DEBUG+1,"found humidity mapping %s",mapping.definition->toString().c_str());
|
LOG_DEBUG(GwLog::DEBUG+1,"found humidity mapping %s",mapping.definition->toString().c_str());
|
||||||
addToXdr(mapping.buildXdrEntry(Humidity));
|
addToXdr(mapping.buildXdrEntry(Humidity));
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
mapping=xdrMappings->getMapping(XDRPRESSURE,N2kps_Atmospheric,0,0);
|
mapping=xdrMappings->getMapping(XDRPRESSURE,N2kps_Atmospheric,0,0);
|
||||||
if (!mapping.empty){
|
if (updateDouble(&mapping,AtmosphericPressure)){
|
||||||
LOG_DEBUG(GwLog::DEBUG+1,"found pressure mapping %s",mapping.definition->toString().c_str());
|
LOG_DEBUG(GwLog::DEBUG+1,"found pressure mapping %s",mapping.definition->toString().c_str());
|
||||||
addToXdr(mapping.buildXdrEntry(AtmosphericPressure));
|
addToXdr(mapping.buildXdrEntry(AtmosphericPressure));
|
||||||
i++;
|
i++;
|
||||||
|
@ -1289,7 +1288,7 @@ private:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
GwXDRFoundMapping mapping=xdrMappings->getMapping(XDRTEMP,(int)TemperatureSource,0,TemperatureInstance);
|
GwXDRFoundMapping mapping=xdrMappings->getMapping(XDRTEMP,(int)TemperatureSource,0,TemperatureInstance);
|
||||||
if (mapping.empty) return;
|
if (! updateDouble(&mapping,Temperature)) return;
|
||||||
LOG_DEBUG(GwLog::DEBUG+1,"found temperature mapping %s",mapping.definition->toString().c_str());
|
LOG_DEBUG(GwLog::DEBUG+1,"found temperature mapping %s",mapping.definition->toString().c_str());
|
||||||
addToXdr(mapping.buildXdrEntry(Temperature));
|
addToXdr(mapping.buildXdrEntry(Temperature));
|
||||||
finalizeXdr();
|
finalizeXdr();
|
||||||
|
|
Loading…
Reference in New Issue