Skip to content

Commit

Permalink
Merge branch 'bugfix/modbus_serial_examples_fix_mode_v52' into 'relea…
Browse files Browse the repository at this point in the history
…se/v5.2'

fix(modbus): Fix the mode setup in modbus slave (backport v5.2)

See merge request espressif/esp-idf!36117
  • Loading branch information
suda-morris committed Jan 6, 2025
2 parents 2f62363 + bf64894 commit 5eaa63a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/protocols/modbus/serial/mb_slave/main/slave.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,11 @@ void app_main(void)

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

// Setup communication parameters and start stack
// Setup communication mode and start stack
#if CONFIG_MB_COMM_MODE_ASCII
comm_info.mode = MB_MODE_ASCII,
comm_info.mode = MB_MODE_ASCII;
#elif CONFIG_MB_COMM_MODE_RTU
comm_info.mode = MB_MODE_RTU,
comm_info.mode = MB_MODE_RTU;
#endif
comm_info.slave_addr = MB_SLAVE_ADDR;
comm_info.port = MB_PORT_NUM;
Expand Down

0 comments on commit 5eaa63a

Please sign in to comment.