From 7eb19e6024af7f05cf94c66fb843439a3509147e Mon Sep 17 00:00:00 2001 From: QuakeGod <quakegod@sina.com> Date: 星期一, 02 九月 2024 15:30:40 +0800 Subject: [PATCH] 2024-09-02 --- ComLib/Src/KLink.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/ComLib/Src/KLink.c b/ComLib/Src/KLink.c index 5b9381a..620e1cd 100644 --- a/ComLib/Src/KLink.c +++ b/ComLib/Src/KLink.c @@ -157,7 +157,9 @@ unsigned short nByteAddr=0; unsigned short nBitAddr=0; unsigned short DataLen=0; //p1->LoadLen; +#if (ENABLE_PLC) unsigned short nValue=0; +#endif //int nSrcAddr=p1->SrcAddr; nKLStatus.nSEQ = ((pKLStat)(&(p1->Stat)))->nSEQ;; @@ -529,7 +531,7 @@ nByteAddr=p1->Params[0] + (p1->Params[1]<<8); //pData=(UCHAR *)(&storedKMSysCfg.theKMSysCfg)+nByteAddr; pData = KMem.pPorts[nDataType]; - DataLen = sizeof(stPortDef); + DataLen = (uint32_t)&(((pstPortDef)(0))->pInstance); PacketLen=KLMakeRplyPacket(p2,nDstHost,nKLStatus.StatByte,p1->nCMD,DataLen,pData); SendPacket(nChn, p2, PacketLen); break; -- Gitblit v1.9.1