wip
This commit is contained in:
@@ -366,8 +366,11 @@ def manager_cleanup() -> None:
|
|||||||
|
|
||||||
cloudlog.info("everything is dead")
|
cloudlog.info("everything is dead")
|
||||||
|
|
||||||
|
last_running = ""
|
||||||
|
|
||||||
def manager_thread(frogpilot_functions) -> None:
|
def manager_thread(frogpilot_functions) -> None:
|
||||||
|
global last_running
|
||||||
|
|
||||||
cloudlog.bind(daemon="manager")
|
cloudlog.bind(daemon="manager")
|
||||||
cloudlog.info("manager start")
|
cloudlog.info("manager start")
|
||||||
cloudlog.info({"environ": os.environ})
|
cloudlog.info({"environ": os.environ})
|
||||||
@@ -419,8 +422,12 @@ def manager_thread(frogpilot_functions) -> None:
|
|||||||
|
|
||||||
running = ' '.join("{}{}\u001b[0m".format("\u001b[32m" if p.proc.is_alive() else "\u001b[31m", p.name)
|
running = ' '.join("{}{}\u001b[0m".format("\u001b[32m" if p.proc.is_alive() else "\u001b[31m", p.name)
|
||||||
for p in managed_processes.values() if p.proc)
|
for p in managed_processes.values() if p.proc)
|
||||||
|
|
||||||
|
# clearpilot
|
||||||
|
if (running != last_running):
|
||||||
print(running)
|
print(running)
|
||||||
cloudlog.debug(running)
|
cloudlog.debug(running)
|
||||||
|
last_running = running
|
||||||
|
|
||||||
# send managerState
|
# send managerState
|
||||||
msg = messaging.new_message('managerState', valid=True)
|
msg = messaging.new_message('managerState', valid=True)
|
||||||
|
|||||||
@@ -856,7 +856,7 @@ void AnnotatedCameraWidget::drawLaneLines(QPainter &painter, const UIState *s) {
|
|||||||
acceleration.push_back(acceleration_const[i]);
|
acceleration.push_back(acceleration_const[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
// try {
|
||||||
for (int i = 0; i < max_len; ++i) {
|
for (int i = 0; i < max_len; ++i) {
|
||||||
// Rewrote to generate color based off of bg_colors[CENTER_LANE_COLOR] constant
|
// Rewrote to generate color based off of bg_colors[CENTER_LANE_COLOR] constant
|
||||||
if (scene.track_vertices[i].y() < 0 || scene.track_vertices[i].y() > height()) continue;
|
if (scene.track_vertices[i].y() < 0 || scene.track_vertices[i].y() > height()) continue;
|
||||||
@@ -878,13 +878,13 @@ void AnnotatedCameraWidget::drawLaneLines(QPainter &painter, const UIState *s) {
|
|||||||
|
|
||||||
i += (i + 2) < max_len ? 1 : 0; // Skipping a point to optimize rendering
|
i += (i + 2) < max_len ? 1 : 0; // Skipping a point to optimize rendering
|
||||||
}
|
}
|
||||||
} catch (const std::exception& e) {
|
// } catch (const std::exception& e) {
|
||||||
// Default shading if for some reason the above code fails
|
// // Default shading if for some reason the above code fails
|
||||||
path_gradient = QLinearGradient(0, height(), 0, 0);
|
// path_gradient = QLinearGradient(0, height(), 0, 0);
|
||||||
path_gradient.setColorAt(0.0, QColor(center_lane_color.red(), center_lane_color.green(), center_lane_color.blue(), static_cast<int>(CENTER_LANE_ALPHA * 255 * 0.5)));
|
// path_gradient.setColorAt(0.0, QColor(center_lane_color.red(), center_lane_color.green(), center_lane_color.blue(), static_cast<int>(CENTER_LANE_ALPHA * 255 * 0.5)));
|
||||||
path_gradient.setColorAt(0.5, QColor(center_lane_color.red(), center_lane_color.green(), center_lane_color.blue(), static_cast<int>(CENTER_LANE_ALPHA * 255 * 0.4)));
|
// path_gradient.setColorAt(0.5, QColor(center_lane_color.red(), center_lane_color.green(), center_lane_color.blue(), static_cast<int>(CENTER_LANE_ALPHA * 255 * 0.4)));
|
||||||
path_gradient.setColorAt(1.0, QColor(center_lane_color.red(), center_lane_color.green(), center_lane_color.blue(), static_cast<int>(OTHER_LANE_ALPHA * 255 * 0.0)));
|
// path_gradient.setColorAt(1.0, QColor(center_lane_color.red(), center_lane_color.green(), center_lane_color.blue(), static_cast<int>(OTHER_LANE_ALPHA * 255 * 0.0)));
|
||||||
}
|
// }
|
||||||
} else {
|
} else {
|
||||||
path_gradient.setColorAt(0.0, QColor(center_lane_color.red(), center_lane_color.green(), center_lane_color.blue(), static_cast<int>(CENTER_LANE_ALPHA * 255 * 0.5)));
|
path_gradient.setColorAt(0.0, QColor(center_lane_color.red(), center_lane_color.green(), center_lane_color.blue(), static_cast<int>(CENTER_LANE_ALPHA * 255 * 0.5)));
|
||||||
path_gradient.setColorAt(0.5, QColor(center_lane_color.red(), center_lane_color.green(), center_lane_color.blue(), static_cast<int>(CENTER_LANE_ALPHA * 255 * 0.4)));
|
path_gradient.setColorAt(0.5, QColor(center_lane_color.red(), center_lane_color.green(), center_lane_color.blue(), static_cast<int>(CENTER_LANE_ALPHA * 255 * 0.4)));
|
||||||
|
|||||||
Reference in New Issue
Block a user