patience4711 / read-APSystems-YC600-QS1-DS3

Software for an esp8266 nodemcu to read data from APS inverters.
130 stars 24 forks source link

use YC600_MAX_NUMBER_OF_INVERTERS definition where suitable #108

Closed fwolfst closed 9 months ago

patience4711 commented 1 year ago

how about adding sln like this
strcpy(initCmd, strcat(sLen(initCmd), initCmd));
insteat of
strcpy(initCmd, strncat(sLen(initCmd), initCmd, sizeof(sLen(initCmd)) + sizeof(initCmd)));

fwolfst commented 1 year ago

how about adding sln like this strcpy(initCmd, strcat(sLen(initCmd), initCmd)); insteat of strcpy(initCmd, strncat(sLen(initCmd), initCmd, sizeof(sLen(initCmd)) + sizeof(initCmd)));

Thanks for looking at it. I had seen it, too. But you said that there are already some changes regarding appending the CRC. Waiting for the new code (so gar, there is only the .bin) before adding more changes to that area of the code.

fwolfst commented 1 year ago

(unrelated to this PR)

patience4711 commented 1 year ago

uploaded the newest files, however the slen addition is not fully tested. In the sending of testcommands it works so i expect it to be good.
I also changed the size of "bufferSend" and expect that "bufferSln" could be 6 or less

I also removed the redundant variables and simplyfied the function sendNO (coordinator)