Skip to content

Conversation

@higor-melo
Copy link
Contributor

@higor-melo higor-melo commented Dec 4, 2025

Depends on:

What is this PR for

Implement a CAN Similar Error Handling

How I did it

Results, How I tested

Checklist

  • Assign yourself in the PR
  • Write unit tests (when relevant)
  • Run rubocop and rake tests locally
  • If this PR initialize a CMAKE package please enable styling and linting
  • Analyse if this PR modifies the UI, if so:
    • Tested Tupan's simulation (Charts) 🗺️
    • Tested Tupan's simulation (Hud) 🕹️
    • Tested ROV's simulation 🕹️

@higor-melo higor-melo self-assigned this Dec 4, 2025
Copy link
Member

@doudou doudou left a comment

Choose a reason for hiding this comment

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

Still missing handling of "bad length", which is actually the one error we currently have.

And no unit tests.

@higor-melo higor-melo requested a review from doudou December 8, 2025 20:52
Copy link

@wvmcastro wvmcastro left a comment

Choose a reason for hiding this comment

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

@higor-melo higor-melo changed the title [DRAFT] fix: allow retries according to error count on modbus [DRAFT] refactor: use a error handling similar to CAN Dec 9, 2025
@higor-melo higor-melo requested a review from wvmcastro December 9, 2025 13:52
@higor-melo higor-melo requested review from doudou, jhonasiv and seixasxbr and removed request for wvmcastro December 15, 2025 13:21
@higor-melo higor-melo force-pushed the modbus-error-handling branch from 682930a to 27caf70 Compare December 15, 2025 16:11
@higor-melo higor-melo marked this pull request as ready for review December 15, 2025 16:14
@higor-melo higor-melo changed the title [DRAFT] refactor: use a error handling similar to CAN refactor: use a error handling similar to CAN Dec 15, 2025
@higor-melo higor-melo force-pushed the modbus-error-handling branch 3 times, most recently from d561cfe to 216ad13 Compare December 15, 2025 18:04
@higor-melo higor-melo requested a review from doudou December 15, 2025 20:06
Copy link

@jhonasiv jhonasiv left a comment

Choose a reason for hiding this comment

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

The only thing I didnt check was whether the expected packet length is correct for each method. Since you didnt explicitly change any tests regarding this, I think they are right, but this is not passing CI at moment with errors on motors_weg_cvw300, so maybe not. Waiting for updates on that

@higor-melo higor-melo force-pushed the modbus-error-handling branch from e2a733a to ef009d3 Compare December 16, 2025 13:27
@higor-melo
Copy link
Contributor Author

The only thing I didnt check was whether the expected packet length is correct for each method. Since you didnt explicitly change any tests regarding this, I think they are right, but this is not passing CI at moment with errors on motors_weg_cvw300, so maybe not. Waiting for updates on that

Yep, there was indeed an issue with one of the tests. I'm double checking all the tests using the modbus reference from here: https://www.modbustools.com/modbus.html

@higor-melo higor-melo requested a review from jhonasiv December 16, 2025 16:22
Keep the default constructor as initializing everything with 1 for
threshold and increment
AFAIK this is not used, I was able to build everything
and it all worked fine. So i'll be removing it and all
the tests related to it.
add a new test for UnexpectedReply function code and length
…essage

Therefore the response payload should have 4 bytes of size
corresponding to the Address High, Address Low, Data High,
Data Low
We're assuming the errors won't happen as much
@higor-melo higor-melo force-pushed the modbus-error-handling branch from 5f539e9 to bd17faf Compare December 17, 2025 19:08
@higor-melo higor-melo requested a review from seixasxbr December 17, 2025 20:24
@higor-melo higor-melo requested a review from doudou December 18, 2025 12:45
remove c_cpp_properties.json from git tracked files
typo `sucess` to `success`
@higor-melo higor-melo force-pushed the modbus-error-handling branch from 624d59a to 4b0912d Compare December 18, 2025 13:05
@higor-melo higor-melo requested a review from doudou December 18, 2025 17:25
@higor-melo higor-melo force-pushed the modbus-error-handling branch 2 times, most recently from 22db9c4 to 1833dc5 Compare December 18, 2025 17:57
@higor-melo higor-melo force-pushed the modbus-error-handling branch from 1833dc5 to 0f1ae27 Compare December 18, 2025 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants