@@ -20,32 +20,9 @@ def read_config():
20
20
except :
21
21
cloudlog .exception ("reading kegman.json error" )
22
22
config = default_config
23
- if "battPercOff" not in config :
24
- config .update ({"battPercOff" : 25 })
25
- if "carVoltageMinEonShutdown" not in config :
26
- config .update ({"carVoltageMinEonShutdown" : 11200 })
27
- if "brakeStoppingTarget" not in config :
28
- config .update ({"brakeStoppingTarget" : 0.25 })
29
- if "angle_steers_offset" not in config :
30
- config .update ({"angle_steers_offset" : 0 })
31
- if "brake_distance_extra" not in config : # extra braking distance in m
32
- config .update ({"brake_distance_extra" : 1 })
33
- if "lastALCAMode" not in config :
34
- config .update ({"lastALCAMode" : 1 })
35
- if "brakefactor" not in config : # brake at 20% higher speeds than what I like
36
- config .update ({"brakefactor" : 1.2 })
37
- if "lastGasMode" not in config :
38
- config .update ({"lastGasMode" : 0 })
39
- if "lastSloMode" not in config :
40
- config .update ({"lastSloMode" : 1 })
41
- if "leadDistance" not in config : # leadDistance only works for Accord and Insight, have not tested other honda vehicles
42
- config .update ({"leadDistance" : 5.0 })
43
- if "useCarCaching" not in config :
44
- config .update ({"useCarCaching" : True }) # disable if you want to grab your car's fingerprint on every boot
45
- if "autoUpdate" not in config :
46
- config .update ({"autoUpdate" : True }) # this lets updated.py check and pull updates every hour and reboot
47
- if "wheelTouchSeconds" not in config :
48
- config .update ({"wheelTouchSeconds" : 1800 })
23
+ for i in default_config :
24
+ if i not in config :
25
+ config .update ({i : default_config [i ]})
49
26
50
27
# force update
51
28
if config ["carVoltageMinEonShutdown" ] == "11800" :
0 commit comments