rename dbs to dbt in convertDBKx for more code clearity

This commit is contained in:
andreas 2025-04-28 18:42:16 +02:00
parent c02122f253
commit 44c9e998c9
1 changed files with 3 additions and 3 deletions

View File

@ -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));
}
}