mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-23 18:22:13 +08:00
Fix?
This commit is contained in:
@@ -53,6 +53,10 @@ class FrogPilotPlanner:
|
||||
|
||||
self.tracking_lead_filter = FirstOrderFilter(0, 0.5, DT_MDL)
|
||||
|
||||
def shutdown(self):
|
||||
self.frogpilot_vcruise.slc.executor.shutdown(wait=False, cancel_futures=True)
|
||||
self.frogpilot_weather.executor.shutdown(wait=False, cancel_futures=True)
|
||||
|
||||
def update(self, now, time_validated, sm, frogpilot_toggles):
|
||||
self.lead_one = sm["radarState"].leadOne
|
||||
|
||||
|
||||
@@ -120,6 +120,8 @@ def frogpilot_thread():
|
||||
started = sm["deviceState"].started
|
||||
|
||||
if not started and started_previously:
|
||||
frogpilot_planner.shutdown()
|
||||
|
||||
frogpilot_toggles = update_toggles(frogpilot_variables, started, theme_manager, thread_manager, time_validated, params, frogpilot_toggles)
|
||||
transition_offroad(frogpilot_planner, theme_manager, thread_manager, time_validated, sm, params, frogpilot_toggles)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user