From a5f29a8522f0ac360b38da56623d852a847ab6a2 Mon Sep 17 00:00:00 2001 From: Greg Esmond Date: Wed, 10 Apr 2019 15:17:51 -0500 Subject: [PATCH] fixed kegman_conf --- selfdrive/kegman_conf.py | 26 +++----------------------- selfdrive/loggerd/uploader.py | 3 ++- 2 files changed, 5 insertions(+), 24 deletions(-) diff --git a/selfdrive/kegman_conf.py b/selfdrive/kegman_conf.py index 77343cf0fd4fa0..5b7a1f701c90d1 100644 --- a/selfdrive/kegman_conf.py +++ b/selfdrive/kegman_conf.py @@ -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 @@ -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 @@ -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 diff --git a/selfdrive/loggerd/uploader.py b/selfdrive/loggerd/uploader.py index 670e924ab4d6ba..14ff9a3cfeb47e 100644 --- a/selfdrive/loggerd/uploader.py +++ b/selfdrive/loggerd/uploader.py @@ -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