From 44c9e998c9c81eabde9bc8f0c6619f0cfc56f83e Mon Sep 17 00:00:00 2001 From: andreas Date: Mon, 28 Apr 2025 18:42:16 +0200 Subject: [PATCH] rename dbs to dbt in convertDBKx for more code clearity --- lib/nmea0183ton2k/NMEA0183DataToN2K.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/nmea0183ton2k/NMEA0183DataToN2K.cpp b/lib/nmea0183ton2k/NMEA0183DataToN2K.cpp index 7b2d902..ef17866 100644 --- a/lib/nmea0183ton2k/NMEA0183DataToN2K.cpp +++ b/lib/nmea0183ton2k/NMEA0183DataToN2K.cpp @@ -662,8 +662,8 @@ private: //we can only send if we have a valid depth beloww tranducer //to compute the offset if (! boatData->DBT->isValid()) return; - double dbs=boatData->DBT->getData(); - double offset=Depth-dbs; + double dbt=boatData->DBT->getData(); + double offset=Depth-dbt; if (offset >= 0 && dt == DBK){ logger->logDebug(GwLog::DEBUG, "strange DBK - more depth then transducer %s", msg.line); return; @@ -676,7 +676,7 @@ private: if (! boatData->DBS->update(Depth,msg.sourceId)) return; } tN2kMsg n2kMsg; - SetN2kWaterDepth(n2kMsg,1,dbs,offset); //on the N2K side we always have depth below transducer + SetN2kWaterDepth(n2kMsg,1,dbt,offset); //on the N2K side we always have depth below transducer send(n2kMsg,msg.sourceId,(n2kMsg.PGN)+String((offset >=0)?1:0)); } }