wip
This commit is contained in:
@@ -133,7 +133,7 @@ def create_acc_cancel(packer, CP, CAN, cruise_info_copy):
|
||||
def create_lfahda_cluster(packer, CAN, enabled, lat_active):
|
||||
values = {
|
||||
"HDA_ICON": 0,
|
||||
"LFA_ICON": 0
|
||||
"LFA_ICON": 2 if enabled else 1 if lat_active else 0
|
||||
}
|
||||
|
||||
return packer.make_can_msg("LFAHDA_CLUSTER", CAN.ECAN, values)
|
||||
|
||||
@@ -641,8 +641,8 @@ void AnnotatedCameraWidget::updateState(const UIState &s) {
|
||||
}
|
||||
|
||||
void AnnotatedCameraWidget::updateLaneEdgeColor(QColor &bgColor) {
|
||||
if (bg != bgColor) {
|
||||
bg = bgColor;
|
||||
if (edgeColor != bgColor) {
|
||||
edgeColor = bgColor;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -904,11 +904,11 @@ void AnnotatedCameraWidget::drawLaneLines(QPainter &painter, const UIState *s) {
|
||||
painter.drawPolygon(scene.track_vertices);
|
||||
|
||||
// Paint path edges ,Use current background color
|
||||
if (bg != bg_colors[STATUS_DISENGAGED]) {
|
||||
if (edgeColor != bg_colors[STATUS_DISENGAGED]) {
|
||||
QLinearGradient edge_gradient;
|
||||
edge_gradient.setColorAt(0.0, QColor(bg.red(), bg.green(), bg.blue(), static_cast<int>(255)));
|
||||
edge_gradient.setColorAt(0.5, QColor(bg.red(), bg.green(), bg.blue(), static_cast<int>(255 * 0.7) ));
|
||||
edge_gradient.setColorAt(1.0, QColor(bg.red(), bg.green(), bg.blue(), static_cast<int>(255 * 0.5)));
|
||||
edge_gradient.setColorAt(0.0, QColor(edgeColor.red(), edgeColor.green(), edgeColor.blue(), static_cast<int>(255)));
|
||||
edge_gradient.setColorAt(0.5, QColor(edgeColor.red(), edgeColor.green(), edgeColor.blue(), static_cast<int>(255 * 0.7) ));
|
||||
edge_gradient.setColorAt(1.0, QColor(edgeColor.red(), edgeColor.green(), edgeColor.blue(), static_cast<int>(255 * 0.5)));
|
||||
|
||||
QPainterPath path;
|
||||
path.addPolygon(scene.track_vertices);
|
||||
|
||||
@@ -308,7 +308,7 @@ private:
|
||||
void mousePressEvent(QMouseEvent* e) override;
|
||||
OnroadAlerts *alerts;
|
||||
AnnotatedCameraWidget *nvg;
|
||||
QColor bg = bg_colors[STATUS_DISENGAGED];
|
||||
QColor edgeColor = bg_colors[STATUS_DISENGAGED];
|
||||
QWidget *map = nullptr;
|
||||
QHBoxLayout* split;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user