Open bobemoe opened 11 months ago
Memory usage change @ df2ffbeb7c09208cd34db1210a2f4e7e0f509f48
Board | flash | % | RAM for global variables | % |
---|---|---|---|---|
arduino:mbed_nano:nano33ble |
0 - 0 | 0.0 - 0.0 | 0 - 0 | 0.0 - 0.0 |
arduino:mbed_opta:opta |
0 - 0 | 0.0 - 0.0 | 0 - 0 | 0.0 - 0.0 |
arduino:mbed_portenta:envie_m7 |
N/A | N/A | N/A | N/A |
arduino:megaavr:uno2018:mode=off |
:small_red_triangle: 0 - +24 | 0.0 - +0.05 | 0 - 0 | 0.0 - 0.0 |
arduino:samd:mkrwifi1010 |
:small_red_triangle: 0 - +16 | 0.0 - +0.01 | 0 - 0 | 0.0 - 0.0 |
I've just found this issue upstream and PR https://github.com/stephane/libmodbus/pull/467
If that is the case, then shouldn't this PR be closed?
Yeah I guess, though I'm still having to use this as a patch as its not actually been merged in upstream.
Gotcha, makes sense. I suppose that also assumes that the libmodbus would also need to be updated in this two too.
On Wed, Jan 3, 2024 at 04:46 bobemoe @.***> wrote:
Yeah I guess, though I'm still having to use this as a patch as its not actually been merged in upstream.
— Reply to this email directly, view it on GitHub https://github.com/arduino-libraries/ArduinoModbus/pull/118#issuecomment-1875169547, or unsubscribe https://github.com/notifications/unsubscribe-auth/AISWKL7P3CEC5G3NX2XTU3LYMUZINAVCNFSM6AAAAAA24YKYI6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZVGE3DSNJUG4 . You are receiving this because you commented.Message ID: @.***>
-- PanzerFowst™
"When life gives you lemons, BLOW 'EM UP!!" --Natsu Dragneel
Fixes #117
I added a condition
ctx->slave!=0
so that a response is not expected if its a broadcast message. This allows theendTransmission
to return asap without blocking waiting for a response that will never come and eventually timing out.I added this to
modbus_write_bits
andmodbus_write_registers
which are the only 2 functions called byendTransmission
This has fixed issue #117 for me.
Not sure if this may need to be added in any other places?