Skip to content

ADD: reconnecting to modbus on configure#11

Merged
macmacal merged 11 commits intohumble-develfrom
feature/connection_error_handling
Mar 11, 2025
Merged

ADD: reconnecting to modbus on configure#11
macmacal merged 11 commits intohumble-develfrom
feature/connection_error_handling

Conversation

@slimasziom
Copy link
Contributor

@slimasziom slimasziom commented Mar 6, 2025

Description

This PR adds to configuration procedure retries to establish connection to modbus. Initially it was meant to be placed in on_error handler, but so far we always need 2-3 retries so we treat it as regular behaviour and the loop is in the on_configure part.

Motivation and context

Not always serial port is opened before controller hardware layer wants to initiate connection to modbus. This results in error in connection and further processing.

Closes #10

How has this been tested?

Tested manually with robotiq_hande_driver package (on real hardware).

Checklist

  • All TODOs in the code have been resolved or linked to a proper issue.
  • Code has been (auto)formatted.
  • Documentation (e.g., README, CHANGELOG, Wiki) has been updated.
  • All automated checks have passed.

Clickup task: 86986zx0u

@slimasziom slimasziom requested review from macmacal and sivral March 6, 2025 16:41
@macmacal macmacal added bug Something isn't working enhancement New feature or request labels Mar 7, 2025
slimasziom and others added 9 commits March 11, 2025 10:16
Co-authored-by: Maciej Aleksandrowicz <mac.aleksandrowicz@gmail.com>
Co-authored-by: Maciej Aleksandrowicz <mac.aleksandrowicz@gmail.com>
Co-authored-by: Maciej Aleksandrowicz <mac.aleksandrowicz@gmail.com>
Co-authored-by: Maciej Aleksandrowicz <mac.aleksandrowicz@gmail.com>
Co-authored-by: Maciej Aleksandrowicz <mac.aleksandrowicz@gmail.com>
Co-authored-by: Maciej Aleksandrowicz <mac.aleksandrowicz@gmail.com>
Co-authored-by: Maciej Aleksandrowicz <mac.aleksandrowicz@gmail.com>
Co-authored-by: Maciej Aleksandrowicz <mac.aleksandrowicz@gmail.com>
@slimasziom
Copy link
Contributor Author

reworked to for-loop, fixed issue, retested on aegis

Copy link
Contributor

@sivral sivral left a comment

Choose a reason for hiding this comment

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

Looks good to me!

Copy link
Contributor

@macmacal macmacal left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@macmacal macmacal merged commit 00fa969 into humble-devel Mar 11, 2025
1 check passed
@macmacal macmacal deleted the feature/connection_error_handling branch March 11, 2025 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Modbus connection check always fails

3 participants