decrease timeout for writing long commands in cfc mode
This commit is contained in:
parent
4000072839
commit
988f8d9b67
@ -1662,8 +1662,8 @@ class ELM:
|
|||||||
# set elm timeout to minimum among 3 values
|
# set elm timeout to minimum among 3 values
|
||||||
# 1) 300ms constant
|
# 1) 300ms constant
|
||||||
# 2) 2 * self.response_time in ms
|
# 2) 2 * self.response_time in ms
|
||||||
# 3) 5s / (number of farmes in cmd)
|
# 3) 4.7s // (number of farmes in cmd) (5s session timeout - 300ms safety gap)
|
||||||
min_tout = min( 300, 2*self.response_time*1000, 5000./(len(raw_command)+1))
|
min_tout = min( 300, 2*self.response_time*1000, 4700.//(len(raw_command)+1))
|
||||||
if min_tout<4:
|
if min_tout<4:
|
||||||
min_tout = 4 # not less then 4ms
|
min_tout = 4 # not less then 4ms
|
||||||
self.elmTimeout = hex(int(min_tout//4))[2:].zfill(2)
|
self.elmTimeout = hex(int(min_tout//4))[2:].zfill(2)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user