File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -801,7 +801,7 @@ def set_can_timeout(self, value):
801801 val = value // 4
802802 if val > 255 :
803803 val = 255
804- val = hex (val )[2 :].upper ()
804+ val = hex (val )[2 :].upper (). zfill ( 2 )
805805 self .cmd ("AT ST %s" % val )
806806
807807 def send_cmd (self , command ):
@@ -961,8 +961,11 @@ def send_can_cfc0(self, command):
961961 Fn = len (raw_command ) # Number of frames
962962
963963 if Fn > 1 or len (raw_command [0 ]) > 15 :
964- # set elm timeout to 300ms for first response
965- self .send_raw ('AT ST 4B' )
964+ if options .cantimeout > 0 :
965+ self .set_can_timeout ( options .cantimeout )
966+ else :
967+ # set elm timeout to 300ms for first response
968+ self .send_raw ('AT ST 4B' )
966969
967970 while Fc < Fn :
968971 # enable responses
You can’t perform that action at this time.
0 commit comments