dragonpilot beta3

date: 2023-08-22T14:36:40
commit: 6882c14d98c8759148d4c762fbffd3e254d2d34a
This commit is contained in:
dragonpilot
2023-08-22 14:36:12 -07:00
parent d8e5331c6e
commit a9ba3193e2
34 changed files with 35 additions and 10 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1 -1
View File
@@ -1 +1 @@
const uint8_t gitversion[8] = "501626f0";
const uint8_t gitversion[8] = "bbab69eb";
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1 -1
View File
@@ -1 +1 @@
const uint8_t gitversion[] = "DEV-501626f0-DEBUG";
const uint8_t gitversion[] = "DEV-bbab69eb-DEBUG";
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1 -1
View File
@@ -1 +1 @@
DEV-501626f0-DEBUG
DEV-bbab69eb-DEBUG
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1 -7
View File
@@ -263,13 +263,7 @@ class CarState(CarStateBase):
messages.append(("BSM", 1))
if dp_toyota_enhanced_bsm:
signals +=[
("BLINDSPOT", "DEBUG"),
("BLINDSPOTSIDE", "DEBUG"),
("BLINDSPOTD1", "DEBUG"),
("BLINDSPOTD2", "DEBUG"),
]
checks.append(("DEBUG", 65))
messages.append(("DEBUG", 65))
if CP.carFingerprint in RADAR_ACC_CAR:
if not CP.flags & ToyotaFlags.SMART_DSU.value:
@@ -0,0 +1,31 @@
import numpy as np
class RoadEdgeDetector:
def __init__(self):
self._is_enabled = False
def get_road_edge_detected(self, road_edge_stds, lane_line_probs, left_blinker, right_blinker):
if not self._is_enabled:
return False, False
# Calculate probabiities for detecting road edges and lane lines
left_road_edge_prob = np.clip(1.0 - road_edge_stds[0], 0.0, 1.0)
left_lane_nearside_prob = lane_line_probs[0]
right_road_edge_prob = np.clip(1.0 - road_edge_stds[1], 0.0, 1.0)
right_lane_nearside_prob = lane_line_probs[3]
# Check conditions for detecting road edges
if right_blinker and right_road_edge_prob > 0.35 and right_lane_nearside_prob < 0.2 and left_lane_nearside_prob >= right_lane_nearside_prob:
return False, True
if left_blinker and left_road_edge_prob > 0.35 and left_lane_nearside_prob < 0.2 and right_lane_nearside_prob >= left_lane_nearside_prob:
return True, False
return False, False
def set_enabled(self, enabled):
self._is_enabled = enabled
def is_enabled(self):
return self._is_enabled