This commit is contained in:
Your Name
2024-02-12 23:06:10 -06:00
parent 9634f1b2e6
commit 2803846987

View File

@@ -1592,34 +1592,36 @@ void AnnotatedCameraWidget::drawStatusBar(QPainter &p) {
p.setOpacity(1.0); p.setOpacity(1.0);
p.drawRoundedRect(statusBarRect, 30, 30); p.drawRoundedRect(statusBarRect, 30, 30);
// QString roadName = roadNameUI ? QString::fromStdString(paramsMemory.get("RoadName")) : QString(); // // QString roadName = roadNameUI ? QString::fromStdString(paramsMemory.get("RoadName")) : QString();
QString roadName = "Hello"; // // QString roadName = QString::fromStdString(paramsMemory.get("oscar_debug"));
// QString roadName = QString::fromStdString(paramsMemory.get("oscar_debug"));
QMap<int, QString> conditionalStatusMap = { // QMap<int, QString> conditionalStatusMap = {
{0, "Conditional Experimental Mode ready"}, // {0, "Conditional Experimental Mode ready"},
{1, "Conditional Experimental overridden"}, // {1, "Conditional Experimental overridden"},
{2, "Experimental Mode manually activated"}, // {2, "Experimental Mode manually activated"},
{3, "Conditional Experimental overridden"}, // {3, "Conditional Experimental overridden"},
{4, "Experimental Mode manually activated"}, // {4, "Experimental Mode manually activated"},
{5, "Experimental Mode activated for navigation" + (mapOpen ? "" : QString(" instructions input"))}, // {5, "Experimental Mode activated for navigation" + (mapOpen ? "" : QString(" instructions input"))},
{6, "Experimental Mode activated due to" + (mapOpen ? "SLC" : QString(" no speed limit set"))}, // {6, "Experimental Mode activated due to" + (mapOpen ? "SLC" : QString(" no speed limit set"))},
{7, "Experimental Mode activated due to" + (mapOpen ? " speed" : " speed being less than " + QString::number(conditionalSpeedLead) + (is_metric ? " kph" : " mph"))}, // {7, "Experimental Mode activated due to" + (mapOpen ? " speed" : " speed being less than " + QString::number(conditionalSpeedLead) + (is_metric ? " kph" : " mph"))},
{8, "Experimental Mode activated due to" + (mapOpen ? " speed" : " speed being less than " + QString::number(conditionalSpeed) + (is_metric ? " kph" : " mph"))}, // {8, "Experimental Mode activated due to" + (mapOpen ? " speed" : " speed being less than " + QString::number(conditionalSpeed) + (is_metric ? " kph" : " mph"))},
{9, "Experimental Mode activated for slower lead"}, // {9, "Experimental Mode activated for slower lead"},
{10, "Experimental Mode activated for turn" + (mapOpen ? "" : QString(" / lane change"))}, // {10, "Experimental Mode activated for turn" + (mapOpen ? "" : QString(" / lane change"))},
{11, "Experimental Mode activated for curve"}, // {11, "Experimental Mode activated for curve"},
{12, "Experimental Mode activated for stop" + (mapOpen ? "" : QString(" sign / stop light"))}, // {12, "Experimental Mode activated for stop" + (mapOpen ? "" : QString(" sign / stop light"))},
}; // };
QString screenSuffix = ". Double tap the screen to revert"; // QString screenSuffix = ". Double tap the screen to revert";
QString wheelSuffix = ". Double press the \"LKAS\" button to revert"; // QString wheelSuffix = ". Double press the \"LKAS\" button to revert";
// if (alwaysOnLateral) {
// newStatus = QString("Always On Lateral active") + (mapOpen ? "" : ". Press the \"Cruise Control\" button to disable");
// } else if (conditionalExperimental) {
// newStatus = conditionalStatusMap.contains(conditionalStatus) && status != STATUS_DISENGAGED ? conditionalStatusMap[conditionalStatus] : conditionalStatusMap[0];
// }
newStatus = "Hello";
if (alwaysOnLateral) {
newStatus = QString("Always On Lateral active") + (mapOpen ? "" : ". Press the \"Cruise Control\" button to disable");
} else if (conditionalExperimental) {
newStatus = conditionalStatusMap.contains(conditionalStatus) && status != STATUS_DISENGAGED ? conditionalStatusMap[conditionalStatus] : conditionalStatusMap[0];
}
// Check if status has changed or if the road name is empty // Check if status has changed or if the road name is empty
if (newStatus != lastShownStatus || roadName.isEmpty()) { if (newStatus != lastShownStatus || roadName.isEmpty()) {