Closed dukess closed 1 year ago
Thanks!
We have a user reporting this behaviour where an unwanted parameter number appears after the parameter value: Is this related to this PR?
Yes, I ran into this problem too. In addition, rounding does not work correctly. Enrages. I think it's better that I cancel the commit (except for a minor fix) and leave everything as it was before. Less beautiful, but it worked.
Ok, could you do that because I don't know what minor fix should be kept? Thanks!
The %g part looks ok to me, but there seems to be one printFmtToWebClient() too many. (That is most of the changes could be kept, but something needs fixing.)
I don't know the code intimately enough, but could it be that desc
in printToWebClient(cfg.desc);
(BSB_LAN.ino line 2732) has (somewhere before) been created to contain one param_no too many? Since cfg
here is set via memcpy(&cfg, &config[i], sizeof(cfg));
some lines before being used, that would mean config[]
setting is the culprit. I have yet to figure out, where that happens.
Sorry, no: cfg here seems to be /C contents, not /Kx
Tried to save most of changes. Did PR.
Thanks!
"%.1f" was replaced with "%g". Code more readable, shorter (and faster?). Thanks to @DE-cr roundf() was replaced with (int)() where is it possible. Fix for /JC and /JK commands (additional condition in printToWebClient_prognrdescaddr() may block parameter name printing) Tested on ESP32.