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

@flxzt flxzt commented Jul 15, 2024

Copy link
Copy Markdown
Contributor

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
flxzt force-pushed the waveshare-rtu-relay branch from 553bff8 to 1b46a92 Compare June 1, 2026 14:10
@codecov

codecov Bot commented Jun 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 60.75949% with 31 lines in your changes missing coverage. Please review.
✅ Project coverage is 60.7%. Comparing base (e4f22e7) to head (10788a9).
✅ 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    60.7%   60.7%   -0.1%     
========================================
  Files         184     185      +1     
  Lines       15099   15156     +57     
========================================
+ Hits         9180    9211     +31     
- Misses       5919    5945     +26     
Flag Coverage Δ
3.10 60.7% <60.7%> (-0.1%) ⬇️
3.11 60.7% <60.7%> (-0.1%) ⬇️
3.12 60.7% <60.7%> (-0.1%) ⬇️
3.13 60.7% <60.7%> (-0.1%) ⬇️
3.14 60.7% <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 Harness.
📢 Have feedback on the report? Share it here.

flxzt added 2 commits August 17, 2026 11:10
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 1b46a92 to 10788a9 Compare August 17, 2026 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants