Duet3D / RepRapFirmware

OO C++ RepRap Firmware
GNU General Public License v3.0
945 stars 535 forks source link

Suppress `M261.1` Modbus comm error when `V` passed #1035

Open benagricola opened 2 months ago

benagricola commented 2 months ago

Quick overview on the forum - but in short, it is already possible to check the status of the Modbus request by checking that the value of the variable is not null.

The error message output by M261.1 on Modbus communication failure is unnecessary for reads where the null result ends up in a variable anyway, and just ends up spamming the console when using the command programmatically.

benagricola commented 2 months ago

Whoops, capitalisation error in the previous commit (nullPtr != nullptr :facepalm:) - fixed now, should be good to go.

benagricola commented 1 month ago

@dc42 Anything else that needs doing to get this merged?

Modbus error reporting is problematic if you're calling M261.1 from inside daemon.g, as the error will cause daemon.g to exit as well.