mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-08-22 11:13:47 +08:00
fix static test
This commit is contained in:
@@ -128,14 +128,12 @@ class LongitudinalPlanner:
|
||||
self.param_read_counter += 1
|
||||
if self.dynamic_experimental_controller.is_enabled() and sm['controlsState'].experimentalMode:
|
||||
self.dynamic_experimental_controller.set_mpc_fcw_crash_cnt(self.mpc.crash_cnt)
|
||||
self.dynamic_experimental_controller.update(self.CP.radarUnavailable, sm['carState'], sm['radarState'].leadOne, sm['modelV2'], sm['controlsState']) #, sm['navInstruction'].maneuverDistance)
|
||||
self.dynamic_experimental_controller.update(self.CP.radarUnavailable, sm['carState'], sm['radarState'].leadOne, sm['modelV2'], sm['controlsState'])
|
||||
#, sm['navInstruction'].maneuverDistance)
|
||||
self.mpc.mode = self.dynamic_experimental_controller.get_mpc_mode()
|
||||
else:
|
||||
self.mpc.mode = 'blended' if sm['controlsState'].experimentalMode else 'acc'
|
||||
|
||||
def update(self, sm):
|
||||
self.mpc.mode = 'blended' if sm['selfdriveState'].experimentalMode else 'acc'
|
||||
|
||||
if len(sm['carControl'].orientationNED) == 3:
|
||||
accel_coast = get_coast_accel(sm['carControl'].orientationNED[1])
|
||||
else:
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#!/usr/bin/env python3
|
||||
# The MIT License
|
||||
#
|
||||
# Copyright (c) 2019-, Rick Lan, dragonpilot community, and a number of other of contributors.
|
||||
@@ -22,7 +21,7 @@
|
||||
# THE SOFTWARE.
|
||||
#
|
||||
# Version = 2024-7-11
|
||||
from common.numpy_fast import interp
|
||||
from openpilot.common.numpy_fast import interp
|
||||
import numpy as np
|
||||
|
||||
# d-e2e, from modeldata.h
|
||||
@@ -262,7 +261,7 @@ class DynamicExperimentalController:
|
||||
# return
|
||||
|
||||
# when blinker is on and speed is driving below V_ACC_MIN: blended
|
||||
# we dont want it to switch mode at higher speed, blended may trigger hard brake
|
||||
# we don't want it to switch mode at higher speed, blended may trigger hard brake
|
||||
#if self._has_blinkers and self._v_ego_kph < V_ACC_MIN:
|
||||
# self._set_mode('blended')
|
||||
# return
|
||||
@@ -312,7 +311,7 @@ class DynamicExperimentalController:
|
||||
return
|
||||
|
||||
# when blinker is on and speed is driving below V_ACC_MIN: blended
|
||||
# we dont want it to switch mode at higher speed, blended may trigger hard brake
|
||||
# we don't want it to switch mode at higher speed, blended may trigger hard brake
|
||||
#if self._has_blinkers and self._v_ego_kph < V_ACC_MIN:
|
||||
# self._set_mode('blended')
|
||||
# return
|
||||
|
||||
Reference in New Issue
Block a user