fredlcore / BSB-LAN

LAN/WiFi interface for Boiler-System-Bus (BSB) and Local Process Bus (LPB) and Punkt-zu-Punkt Schnittstelle (PPS) with a Siemens® controller used by Elco®, Brötje® and similar heating systems
231 stars 84 forks source link

code readability, reducing the number of sensors programs setup points #449

Closed dukess closed 2 years ago

dukess commented 2 years ago

Oh, one more thing: functions tables sizes was corrected for Mega users.

fredlcore commented 2 years ago

What do you mean that functions tables sizes were correct? The cmdtbl sizes? I think most of them are more than 32767 bytes now, isn't it? 32k is the maximum on the Mega...

dukess commented 2 years ago

Yep. I tried to compile for Mega and program was built normally. Sure, they size was bigger than flash size.

fredlcore @.***> 25 марта 2022 г. 0:23:08 написал:

What do you mean that functions tables sizes were correct? The cmdtbl sizes? I think most of them are more than 32767 bytes now, isn't it? 32k is the maximum on the Mega... — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

fredlcore commented 2 years ago

Well, it didn't produce an error before, but there was a memory overflow which resulted to mixed up texts etc. which Mega users have been reporting for a while now...

dukess commented 2 years ago

Unfortunately we can't help with this. :( I have one more idea: I can add a check for the absence of overlapping number ranges of user sensor programs. This can be useful when users will change the number of sensors. Or is it not worth thinking about it yet?

fredlcore commented 2 years ago

No, no need to help with that - Mega is now hopelessly too small, in many ways, so we just keep it as it is. We could rather think of removing the Mega code to make the code more readable.

As for the overlapping number ranges, I'm not sure I understand what you mean with that? The user parameter numbers are fixed, so how should they overlap?

dukess commented 2 years ago

Just an example: if user will set 'Averages" array size more than 50 elements and query programs 20100 and above (DHT sensors), he can get unexpected answer (average value(s)) instead DHT descriptions and values.

fredlcore commented 2 years ago

Ah, ok, got it - hm, I would wait for that until we really see the need for it - otherwise we encourage people to make these kind of changes and everybody does their own kind of stuff which makes debugging more difficult...

dukess commented 2 years ago

Got you. :)