Skip to content

driver: add driver for waveshare RTU relay#1441

Open
flxzt wants to merge 2 commits into
labgrid-project:masterfrom
flxzt:waveshare-rtu-relay
Open

driver: add driver for waveshare RTU relay#1441
flxzt wants to merge 2 commits into
labgrid-project:masterfrom
flxzt:waveshare-rtu-relay

Conversation

@flxzt
Copy link
Copy Markdown
Contributor

@flxzt flxzt commented Jul 15, 2024

Description

This adds a driver for Waveshare ModbusRTU Relays.
These relays speak modbus so this added driver is dependent on PR #1394 .
In my current setup the relay is used to toggle the power supply of the DUT and to toggle a jumper.
I verified that the added driver works, it has been tested with the cli, the scripting and pytest interface.

Checklist

  • Documentation for the feature
  • Tests for the feature
  • The arguments and description in doc/configuration.rst have been updated
  • PR has been tested

@flxzt flxzt force-pushed the waveshare-rtu-relay branch from 0a67fe1 to 553bff8 Compare August 19, 2024 08:32
flxzt added 2 commits June 1, 2026 16:06
refactor ModbusRTUDriver to use SerialPort resource directly

Signed-off-by: Felix Zwettler <felix.zwettler@duagon.com>
this adds a driver that controls Waveshare Relais speaking Modbus RTU.

Signed-off-by: Felix Zwettler <felix.zwettler@duagon.com>
@flxzt flxzt force-pushed the waveshare-rtu-relay branch from 553bff8 to 1b46a92 Compare June 1, 2026 14:10
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 1, 2026

Codecov Report

❌ Patch coverage is 60.75949% with 31 lines in your changes missing coverage. Please review.
✅ Project coverage is 46.0%. Comparing base (5818762) to head (1b46a92).
⚠️ Report is 2 commits behind head on master.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
labgrid/driver/modbusrtudriver.py 46.6% 24 Missing ⚠️
labgrid/driver/wavesharerturelaisdriver.py 82.1% 5 Missing ⚠️
labgrid/resource/modbusrtu.py 60.0% 2 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff           @@
##           master   #1441   +/-   ##
======================================
  Coverage    46.0%   46.0%           
======================================
  Files         180     181    +1     
  Lines       14462   14519   +57     
======================================
+ Hits         6654    6686   +32     
- Misses       7808    7833   +25     
Flag Coverage Δ
3.10 46.0% <60.7%> (+<0.1%) ⬆️
3.11 46.0% <60.7%> (+<0.1%) ⬆️
3.12 46.0% <60.7%> (+<0.1%) ⬆️
3.13 46.0% <60.7%> (+<0.1%) ⬆️
3.14 46.0% <60.7%> (+<0.1%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

1 participant