read arg in read_highstate.py

This commit is contained in:
LuoBin 2024-09-02 14:51:36 +08:00
parent fa4cbef093
commit 2609e6fd2f
1 changed files with 2 additions and 1 deletions

View File

@ -15,7 +15,8 @@ def HighStateHandler(msg: SportModeState_):
if __name__ == "__main__":
ChannelFactoryInitialize(0, "enp3s0")
# sys.argv[1]: name of the network interface
ChannelFactoryInitialize(0, sys.argv[1])
sub = ChannelSubscriber("rt/sportmodestate", SportModeState_)
sub.Init(HighStateHandler, 10)