From d7f1986bd105a13de22a09191c02b7b4dcfa12aa Mon Sep 17 00:00:00 2001 From: Devson Butani <96811105+Aeolus96@users.noreply.github.com> Date: Fri, 19 Jul 2024 14:53:12 -0400 Subject: [PATCH] Update ChannelFactoryInitialize to use sys.argv[1] --- example/high_level/read_highstate.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/example/high_level/read_highstate.py b/example/high_level/read_highstate.py index ba43a76..aedd763 100644 --- a/example/high_level/read_highstate.py +++ b/example/high_level/read_highstate.py @@ -15,7 +15,10 @@ def HighStateHandler(msg: SportModeState_): if __name__ == "__main__": - ChannelFactoryInitialize(0, "enp3s0") + if len(sys.argv)>1: + ChannelFactoryInitialize(0, sys.argv[1]) + else: + ChannelFactoryInitialize(0) sub = ChannelSubscriber("rt/sportmodestate", SportModeState_) sub.Init(HighStateHandler, 10)