Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions subsys/modbus/modbus_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ void modbus_tx_adu(struct modbus_context *ctx)

int modbus_tx_wait_rx_adu(struct modbus_context *ctx)
{
k_sem_reset(&ctx->client_wait_sem);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you like to add a test case to catch this in the tests?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I get some leeway at work, I'll get an nucleo board working and submit a test case. I think the easiest way to do it would be to artificially delay the server response past the timeout. But I'm not sure when I'll get to it.


modbus_tx_adu(ctx);

if (k_sem_take(&ctx->client_wait_sem, K_USEC(ctx->rxwait_to)) != 0) {
Expand Down
Loading