diff --git a/selfdrive/car/honda/interface.py b/selfdrive/car/honda/interface.py index 4fb3efdfc..bc35baeef 100755 --- a/selfdrive/car/honda/interface.py +++ b/selfdrive/car/honda/interface.py @@ -384,7 +384,7 @@ class CarInterface(object): def update(self, c, can_strings): # dragonpilot, don't check for param too often as it's a kernel call ts = sec_since_boot() - if ts - self.ts_last_check > 3.: + if ts - self.ts_last_check > 5.: self.dragon_enable_steering_on_signal = False if params.get("DragonEnableSteeringOnSignal") == "0" else True self.dragon_allow_gas = False if params.get("DragonAllowGas") == "0" else True self.ts_last_check = ts diff --git a/selfdrive/car/toyota/carstate.py b/selfdrive/car/toyota/carstate.py index 9c6f592b5..2f91db2db 100644 --- a/selfdrive/car/toyota/carstate.py +++ b/selfdrive/car/toyota/carstate.py @@ -143,7 +143,7 @@ class CarState(object): def update(self, cp): # dragonpilot, don't check for param too often as it's a kernel call ts = sec_since_boot() - if ts - self.ts_last_check > 3.: + if ts - self.ts_last_check > 5.: self.dragon_toyota_stock_dsu = False if params.get("DragonToyotaStockDSU") == "0" else True self.ts_last_check = ts diff --git a/selfdrive/car/toyota/interface.py b/selfdrive/car/toyota/interface.py index 0b3e77eb6..666abb104 100755 --- a/selfdrive/car/toyota/interface.py +++ b/selfdrive/car/toyota/interface.py @@ -302,7 +302,7 @@ class CarInterface(object): def update(self, c, can_strings): # dragonpilot, don't check for param too often as it's a kernel call ts = sec_since_boot() - if ts - self.ts_last_check > 3.: + if ts - self.ts_last_check > 5.: self.dragon_enable_steering_on_signal = False if params.get("DragonEnableSteeringOnSignal") == "0" else True self.dragon_allow_gas = False if params.get("DragonAllowGas") == "0" else True self.dragon_toyota_stock_dsu = False if params.get("DragonToyotaStockDSU") == "0" else True diff --git a/selfdrive/controls/controlsd.py b/selfdrive/controls/controlsd.py index 808a5309a..75295d353 100755 --- a/selfdrive/controls/controlsd.py +++ b/selfdrive/controls/controlsd.py @@ -512,7 +512,7 @@ def controlsd_thread(sm=None, pm=None, can_sock=None): while True: # dragonpilot, don't check for param too often as it's a kernel call ts = sec_since_boot() - if ts - ts_last_check > 3.: + if ts - ts_last_check > 5.: dragon_toyota_stock_dsu = False if params.get("DragonToyotaStockDSU") == "0" else True dragon_lat_control = False if params.get("DragonLatCtrl") == "0" else True dragon_display_steering_limit_alert = False if params.get("DragonDisplaySteeringLimitAlert") == "0" else True diff --git a/selfdrive/controls/lib/lane_planner.py b/selfdrive/controls/lib/lane_planner.py index c32d09e4a..cfee015d5 100644 --- a/selfdrive/controls/lib/lane_planner.py +++ b/selfdrive/controls/lib/lane_planner.py @@ -69,7 +69,7 @@ class LanePlanner(object): def update_lane(self, v_ego): ts = sec_since_boot() - if ts - self.ts_last_check > 3.: + if ts - self.ts_last_check > 5.: self.camera_offset = int(params.get("DragonCameraOffset")) * 0.01 self.ts_last_check = ts # only offset left and right lane lines; offsetting p_poly does not make sense diff --git a/selfdrive/dragonpilot/shutdownd/shutdownd.py b/selfdrive/dragonpilot/shutdownd/shutdownd.py index 552729534..d5e634361 100644 --- a/selfdrive/dragonpilot/shutdownd/shutdownd.py +++ b/selfdrive/dragonpilot/shutdownd/shutdownd.py @@ -17,8 +17,8 @@ def main(gctx=None): usb_online = bool(int(f.read())) if not usb_online: - # we update the value every 3 seconds in case of user updates it - if frame % 3 == 0: + # we update the value every 5 seconds in case of user updates it + if frame % 5 == 0: auto_shutdown_at = get_shutdown_val() shutdown_count += 1 else: diff --git a/selfdrive/thermald.py b/selfdrive/thermald.py index b29464b74..27e708e2c 100755 --- a/selfdrive/thermald.py +++ b/selfdrive/thermald.py @@ -153,7 +153,6 @@ def thermald_thread(): charging_disabled = False os.system('echo "1" > /sys/class/power_supply/battery/charging_enabled') ts_last_ip = 0. - last_ip_addr = '255.255.255.255' ip_addr = '255.255.255.255' while 1: @@ -184,7 +183,7 @@ def thermald_thread(): msg.thermal.usbOnline = bool(int(f.read())) # update ip every 5 seconds ts = sec_since_boot() - if ts - ts_last_ip > 5.: + if ts - ts_last_ip > 10.: try: result = subprocess.check_output(["service", "call", "connectivity", "2"]).strip().split("\n") except subprocess.CalledProcessError: @@ -196,12 +195,9 @@ def thermald_thread(): result = subprocess.check_output(["ifconfig", "wlan0"]) ip_addr = re.findall(r"inet addr:((\d+\.){3}\d+)", result)[0][0] else: - ip_addr = ' ' + ip_addr = '' ts_last_ip = ts - else: - ip_addr = last_ip_addr msg.thermal.ipAddr = ip_addr - last_ip_addr = ip_addr current_filter.update(msg.thermal.batteryCurrent / 1e6)