diff --git a/selfdrive/car/hyundai/carstate.py b/selfdrive/car/hyundai/carstate.py index ecaa384..4b4e6bc 100644 --- a/selfdrive/car/hyundai/carstate.py +++ b/selfdrive/car/hyundai/carstate.py @@ -294,6 +294,7 @@ class CarState(CarStateBase): # print('Hello World', file=sys.stderr) # sys.stderr.write(str({k: v for k, v in vars(ret).items() if isinstance(v, (int, float, str, bool))}) + '\n') # print(ret, sys.stderr) + print(ret.cruiseState, sys.stderr) # notes on self: # lkas_enabled = 1 = lkas button has been pressed # prev_cruise_buttons = 0 (none), 1, 2 - up down diff --git a/selfdrive/frogpilot/controls/lib/frogpilot_functions.py b/selfdrive/frogpilot/controls/lib/frogpilot_functions.py index c963fa4..d7cc14a 100644 --- a/selfdrive/frogpilot/controls/lib/frogpilot_functions.py +++ b/selfdrive/frogpilot/controls/lib/frogpilot_functions.py @@ -33,7 +33,12 @@ def calculate_lane_width(lane, current_lane, road_edge): def calculate_road_curvature(modelData, v_ego): predicted_velocities = np.array(modelData.velocity.x) + # clearpilot fix + # /data/openpilot/openpilot/selfdrive/frogpilot/controls/lib/frogpilot_functions.py:36: RuntimeWarning: divide by zero encountered in divide + # curvature_ratios = np.abs(np.array(modelData.acceleration.y)) / (predicted_velocities**2) curvature_ratios = np.abs(np.array(modelData.acceleration.y)) / (predicted_velocities**2) + # /data/openpilot/openpilot/selfdrive/frogpilot/controls/lib/frogpilot_functions.py:37: RuntimeWarning: invalid value encountered in multiply + # return np.amax(curvature_ratios * (v_ego**2)) return np.amax(curvature_ratios * (v_ego**2)) class MovingAverageCalculator: