]> sigrok.org Git - libsigrok.git/commitdiff
modbus: Increase modbus reply timeout to 500ms.
authorJames Churchill <redacted>
Sun, 18 Feb 2018 06:29:01 +0000 (16:29 +1000)
committerJames Churchill <redacted>
Mon, 26 Mar 2018 05:41:01 +0000 (15:41 +1000)
Needed by rdtech-dps driver, 100ms is too short.

src/modbus/modbus_serial_rtu.c

index ae76e7cf769edf2e14c7dd3d8489ab44467c521a..4b15d241fcdf14c1b35a761b60d4814b0b429008 100644 (file)
@@ -133,7 +133,7 @@ static int modbus_serial_rtu_read_begin(void *priv, uint8_t *function_code)
        uint8_t slave_addr;
        int ret;
 
-       ret = serial_read_blocking(modbus->serial, &slave_addr, 1, 100);
+       ret = serial_read_blocking(modbus->serial, &slave_addr, 1, 500);
        if (ret != 1 || slave_addr != modbus->slave_addr)
                return ret;