From 61845d4312a64bf3f3609635ba39ac04b606f99e Mon Sep 17 00:00:00 2001 From: DogezRule Date: Thu, 10 Sep 2026 22:17:06 -0400 Subject: [PATCH] Fix Bosch radar scaling for Pre-AP Tesla Scale radar distance and speeds down by a factor of 4 to match vision. --- opendbc/dbc/generator/tesla/_radar_common.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/opendbc/dbc/generator/tesla/_radar_common.py b/opendbc/dbc/generator/tesla/_radar_common.py index c25f57d3e40..1e35b32363e 100755 --- a/opendbc/dbc/generator/tesla/_radar_common.py +++ b/opendbc/dbc/generator/tesla/_radar_common.py @@ -3,11 +3,11 @@ def get_radar_point_definition(base_id, base_name): return f""" BO_ {base_id} {base_name}_A: 8 Radar - SG_ LongDist : 0|12@1+ (0.0625,0) [0|255.9] "meters" Autopilot - SG_ LongSpeed : 12|12@1+ (0.0625,-128) [-128|128] "meters/sec" Autopilot - SG_ LatDist : 24|11@1+ (0.125,-128) [-128|128] "meters" Autopilot + SG_ LongDist : 0|12@1+ (0.015625,0) [0|255.9] "meters" Autopilot + SG_ LongSpeed : 12|12@1+ (0.015625,-128) [-128|128] "meters/sec" Autopilot + SG_ LatDist : 24|11@1+ (0.0078125,-128) [-128|128] "meters" Autopilot SG_ ProbExist : 35|5@1+ (3.125,0) [0|96.875] "%" Autopilot - SG_ LongAccel : 40|10@1+ (0.03125,-16) [-16|16] "meters/sec/sec" Autopilot + SG_ LongAccel : 40|10@1+ (0.0078125,-16) [-16|16] "meters/sec/sec" Autopilot SG_ ProbObstacle : 50|5@1+ (3.125,0) [0|96.875] "%" Autopilot SG_ Valid : 55|1@1+ (1,0) [0|1] "" Autopilot SG_ ProbNonObstacle : 56|5@1+ (3.125,0) [0|96.875] "%" Autopilot @@ -16,8 +16,8 @@ def get_radar_point_definition(base_id, base_name): SG_ Index : 63|1@1+ (1,0) [0|1] "" Autopilot BO_ {base_id+1} {base_name}_B: 8 Radar - SG_ LatSpeed : 0|10@1+ (0.125,-64) [-64|64] "meters/sec" Autopilot - SG_ Length : 10|6@1+ (0.125,0) [0|7.875] "m" Autopilot + SG_ LatSpeed : 0|10@1+ (0.0078125,-64) [-64|64] "meters/sec" Autopilot + SG_ Length : 10|6@1+ (0.0078125,0) [0|7.875] "m" Autopilot SG_ dZ : 16|6@1+ (0.25,-5) [-5|10.75] "m" Autopilot SG_ MovingState : 22|2@1+ (1,0) [0|3] "" Autopilot SG_ dxSigma : 24|6@1+ (1,0) [0|63] "" Autopilot