Skip to content

Commit b77ecce

Browse files
committed
Merge branch 'contrib/github_pr_14878' into 'master'
fix(modbus): Fix the mode setup in modbus slave (GitHub PR) Closes IDFGH-14059 See merge request espressif/esp-idf!35237
2 parents 547fa88 + a0c3a72 commit b77ecce

File tree

1 file changed

+3
-3
lines changed
  • examples/protocols/modbus/serial/mb_slave/main

1 file changed

+3
-3
lines changed

examples/protocols/modbus/serial/mb_slave/main/slave.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,11 @@ void app_main(void)
9999

100100
ESP_ERROR_CHECK(mbc_slave_init(MB_PORT_SERIAL_SLAVE, &mbc_slave_handler)); // Initialization of Modbus controller
101101

102-
// Setup communication parameters and start stack
102+
// Setup communication mode and start stack
103103
#if CONFIG_MB_COMM_MODE_ASCII
104-
comm_info.mode = MB_MODE_ASCII,
104+
comm_info.mode = MB_MODE_ASCII;
105105
#elif CONFIG_MB_COMM_MODE_RTU
106-
comm_info.mode = MB_MODE_RTU,
106+
comm_info.mode = MB_MODE_RTU;
107107
#endif
108108
comm_info.slave_addr = MB_SLAVE_ADDR;
109109
comm_info.port = MB_PORT_NUM;

0 commit comments

Comments
 (0)