Skip to content

Commit a45eecc

Browse files
committed
client: add invert method to io client commands
Add support for the "invert" method to the io protocol Signed-off-by: Perry Melange <[email protected]>
1 parent 68d5c7f commit a45eecc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

labgrid/remote/client.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -937,6 +937,8 @@ def digital_io(self):
937937
drv.set(True)
938938
elif action == "low":
939939
drv.set(False)
940+
elif action == "invert":
941+
drv.invert()
940942

941943
async def _console(self, place, target, timeout, *, logfile=None, loop=False, listen_only=False):
942944
name = self.args.name
@@ -1822,7 +1824,7 @@ def main():
18221824
subparser.set_defaults(func=ClientSession.power)
18231825

18241826
subparser = subparsers.add_parser("io", help="change (or get) a digital IO status")
1825-
subparser.add_argument("action", choices=["high", "low", "get"], help="action")
1827+
subparser.add_argument("action", choices=["high", "low", "invert", "get"], help="action")
18261828
subparser.add_argument("name", help="optional resource name", nargs="?")
18271829
subparser.set_defaults(func=ClientSession.digital_io)
18281830

0 commit comments

Comments
 (0)