Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

INGM-580 Improve the PDO watchdog timeout setting #297

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

MartinALL91
Copy link
Contributor

Description

Improve the PDO watchdog timeout setting.

Fixes # INGM-580

Type of change

  • Add a method to set the PDO watchdog timeout.
  • Calculate the max watchdog timeout based on whether it was set manually.

Tests

  • Connect to ML3.
  • Open a scope and set the mode to PDO poller.
  • Set a very high sampling time (>3500 ms)
  • Check that the poller is stopped and that an error message showing the max sampling time is shown.

Documentation

Please update the documentation.

  • Update docstrings of every function, method or class that change.
  • USe type hints for every function and argument.
  • Build documentation locally to verify changes.
  • Add the changes at the [Unreleased] section of the CHANGELOG.

Code formatting

  • Use the ruff package to format the code: ruff format ingeniamotion tests.
  • Use the ruff package to lint the code: ruff check ingeniamotion tests.

Others

  • Set fix version field in the Jira issue.

for servo in self._net.servos:
servo.set_pdo_watchdog_time(self._watchdog_timeout)
except AttributeError as e:
max_pdo_watchdog = re.findall(r"\d+\.\d+|\d+", e.__str__())
Copy link
Contributor

@polfeliu polfeliu Feb 5, 2025

Choose a reason for hiding this comment

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

This looks sketchy. I'm not sure if the formatting of this line can be considered a stable API: https://github.com/bnjmnp/pysoem/blob/1b730b6d97e95d1e7bde5bb0de471fe11d85119d/src/pysoem/pysoem.pyx#L1073

What if we contributed with a pysoem function that was get_watchdog_maximum_limit()?

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.

2 participants