wip
This commit is contained in:
@@ -1592,34 +1592,36 @@ void AnnotatedCameraWidget::drawStatusBar(QPainter &p) {
|
||||
p.setOpacity(1.0);
|
||||
p.drawRoundedRect(statusBarRect, 30, 30);
|
||||
|
||||
// QString roadName = roadNameUI ? QString::fromStdString(paramsMemory.get("RoadName")) : QString();
|
||||
QString roadName = "Hello";
|
||||
// QString roadName = QString::fromStdString(paramsMemory.get("oscar_debug"));
|
||||
// // QString roadName = roadNameUI ? QString::fromStdString(paramsMemory.get("RoadName")) : QString();
|
||||
// // QString roadName = QString::fromStdString(paramsMemory.get("oscar_debug"));
|
||||
|
||||
QMap<int, QString> conditionalStatusMap = {
|
||||
{0, "Conditional Experimental Mode ready"},
|
||||
{1, "Conditional Experimental overridden"},
|
||||
{2, "Experimental Mode manually activated"},
|
||||
{3, "Conditional Experimental overridden"},
|
||||
{4, "Experimental Mode manually activated"},
|
||||
{5, "Experimental Mode activated for navigation" + (mapOpen ? "" : QString(" instructions input"))},
|
||||
{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"))},
|
||||
{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"},
|
||||
{10, "Experimental Mode activated for turn" + (mapOpen ? "" : QString(" / lane change"))},
|
||||
{11, "Experimental Mode activated for curve"},
|
||||
{12, "Experimental Mode activated for stop" + (mapOpen ? "" : QString(" sign / stop light"))},
|
||||
};
|
||||
// QMap<int, QString> conditionalStatusMap = {
|
||||
// {0, "Conditional Experimental Mode ready"},
|
||||
// {1, "Conditional Experimental overridden"},
|
||||
// {2, "Experimental Mode manually activated"},
|
||||
// {3, "Conditional Experimental overridden"},
|
||||
// {4, "Experimental Mode manually activated"},
|
||||
// {5, "Experimental Mode activated for navigation" + (mapOpen ? "" : QString(" instructions input"))},
|
||||
// {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"))},
|
||||
// {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"},
|
||||
// {10, "Experimental Mode activated for turn" + (mapOpen ? "" : QString(" / lane change"))},
|
||||
// {11, "Experimental Mode activated for curve"},
|
||||
// {12, "Experimental Mode activated for stop" + (mapOpen ? "" : QString(" sign / stop light"))},
|
||||
// };
|
||||
|
||||
QString screenSuffix = ". Double tap the screen to revert";
|
||||
QString wheelSuffix = ". Double press the \"LKAS\" button to revert";
|
||||
// QString screenSuffix = ". Double tap the screen 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
|
||||
if (newStatus != lastShownStatus || roadName.isEmpty()) {
|
||||
|
||||
Reference in New Issue
Block a user