Update ChannelFactoryInitialize to use sys.argv[1]
This commit is contained in:
parent
bd24b5be05
commit
d7f1986bd1
|
@ -15,7 +15,10 @@ def HighStateHandler(msg: SportModeState_):
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
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 = ChannelSubscriber("rt/sportmodestate", SportModeState_)
|
||||||
sub.Init(HighStateHandler, 10)
|
sub.Init(HighStateHandler, 10)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue