Skip to content

Commit

Permalink
fixed kegman_conf
Browse files Browse the repository at this point in the history
  • Loading branch information
Gernby committed Apr 10, 2019
1 parent 6af7793 commit a5f29a8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 24 deletions.
26 changes: 3 additions & 23 deletions selfdrive/kegman_conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@ def init_config(self, CP):
if self.conf['tuneGernby'] == "-1":
self.conf['tuneGernby'] = str(1)
write_conf = True
if self.conf['rateFF'] == "-1":
self.conf['rateFF'] = "0.1"
write_conf = True
if self.conf['angleFF'] == "-1":
self.conf['angleFF'] = "1.0"
write_conf = True
if self.conf['reactMPC'] == "-1":
self.conf['reactMPC'] = str(round(CP.steerMPCReactTime,3))
write_conf = True
Expand Down Expand Up @@ -48,25 +42,11 @@ def read_config(self):
self.element_updated = True

if "tuneGernby" not in self.config:
self.config.update({"tuneGernby":"0"})
self.config.update({"react":"-1"})
self.config.update({"tuneGernby":"1"})
self.config.update({"Kp":"-1"})
self.config.update({"Ki":"-1"})
self.element_updated = True

if "rateFF" not in self.config:
self.config.update({"rateFF":"0.1"})
self.config.update({"angleFF":"1.0"})
self.element_updated = True

if "dampMPC" not in self.config:
self.config.update({"dampMPC":"-1"})
self.config.update({"dampSteer":"-1"})
self.element_updated = True

if "reactMPC" not in self.config:
self.config.update({"reactMPC":"-1"})
self.config.update({"reactSteer":"-1"})
self.element_updated = True

# Force update battery charge limits to higher values for Big Model
Expand All @@ -81,8 +61,8 @@ def read_config(self):
else:
self.config = {"cameraOffset":"0.06", "lastTrMode":"1", "battChargeMin":"60", "battChargeMax":"70", \
"wheelTouchSeconds":"180", "battPercOff":"25", "carVoltageMinEonShutdown":"11800", \
"brakeStoppingTarget":"0.25", "tuneGernby":"0", "reactSteer":"-1", "reactMPC":"-1", \
"dampMPC":"-1", "dampSteer":"-1", "rateFF":"0.1", "angleFF":"1.0", "Kp":"-1", "Ki":"-1"}
"brakeStoppingTarget":"0.25", "tuneGernby":"1", "reactMPC":"-1", \
"dampMPC":"-1", "Kp":"-1", "Ki":"-1"}

self.write_config(self.config)
return self.config
Expand Down
3 changes: 2 additions & 1 deletion selfdrive/loggerd/uploader.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ def is_on_hotspot():

is_android = result.startswith('192.168.43.')
is_ios = result.startswith('172.20.10.')
return (is_android or is_ios)
is_lenovo = result.startswith('192.168.137.')
return (is_android or is_ios or is_lenovo)
except:
return False

Expand Down

0 comments on commit a5f29a8

Please sign in to comment.