We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If I try to write a zero value to a coil or a register, I get ERROR: the index 'writeValues' does not exist from the ModbusSlave library.
ERROR: the index 'writeValues' does not exist
This is due to this incorrect check: https://github.com/electricimp/Modbus/blob/master/ModbusSlave/ModbusSlave.device.lib.nut#L171
If a zero value is provided, this code doesn't do result.writeValues <- writeValues but expects the writeValues field for any write operation.
result.writeValues <- writeValues
writeValues
To fix this, it's enough to check writeValues != null there. So zero value will pass this check too.
writeValues != null
The text was updated successfully, but these errors were encountered:
No branches or pull requests
If I try to write a zero value to a coil or a register, I get
ERROR: the index 'writeValues' does not exist
from the ModbusSlave library.This is due to this incorrect check: https://github.com/electricimp/Modbus/blob/master/ModbusSlave/ModbusSlave.device.lib.nut#L171
If a zero value is provided, this code doesn't do
result.writeValues <- writeValues
but expects thewriteValues
field for any write operation.To fix this, it's enough to check
writeValues != null
there. So zero value will pass this check too.The text was updated successfully, but these errors were encountered: