This commit is contained in:
Your Name
2024-05-18 01:59:31 -05:00
parent 619acbaa0f
commit d97fc9077e
3 changed files with 6 additions and 0 deletions

View File

@@ -233,6 +233,7 @@ std::unordered_map<std::string, uint32_t> keys = {
{"CarModel", PERSISTENT}, {"CarModel", PERSISTENT},
{"CarSpeedLimit", PERSISTENT}, {"CarSpeedLimit", PERSISTENT},
{"CarSpeedLimitLiteral", PERSISTENT}, {"CarSpeedLimitLiteral", PERSISTENT},
{"SpeedLimitLatDesired", PERSISTENT},
{"CECurves", PERSISTENT}, {"CECurves", PERSISTENT},
{"CECurvesLead", PERSISTENT}, {"CECurvesLead", PERSISTENT},
{"CENavigation", PERSISTENT}, {"CENavigation", PERSISTENT},

View File

@@ -1239,6 +1239,7 @@ class Controls:
if any(be.pressed and be.type == FrogPilotButtonType.lkas for be in CS.buttonEvents): if any(be.pressed and be.type == FrogPilotButtonType.lkas for be in CS.buttonEvents):
# CC.cruiseControl.resume = True # CC.cruiseControl.resume = True
CC.cruiseControl.cancel = True CC.cruiseControl.cancel = True
self.params.set_int("SpeedLimitLatDesired", CC.actuators.speed)
# CC.actuators.speed # CC.actuators.speed
# print ("Alive") # print ("Alive")
return CC return CC

View File

@@ -448,6 +448,10 @@ void AnnotatedCameraWidget::drawHud(QPainter &p) {
QString speedLimitStr = QString::number(paramsMemory.getInt("CarSpeedLimitLiteral")); QString speedLimitStr = QString::number(paramsMemory.getInt("CarSpeedLimitLiteral"));
drawSpeedWidget(p, 60, 45 + (225), QString("Limit"), speedLimitStr, QColor(0xff, 0xff, 0xff)); drawSpeedWidget(p, 60, 45 + (225), QString("Limit"), speedLimitStr, QColor(0xff, 0xff, 0xff));
// Todo: needs to be changed to calculate off of actual speed limit for release
QString SpeedLimitLatDesired = QString::number(paramsMemory.getInt("SpeedLimitLatDesired"));
drawSpeedWidget(p, 60, 45 + (225 * 2), QString("Exp"), SpeedLimitLatDesired, QColor(0xff, 0xff, 0xff));
// Todo: lead speed // Todo: lead speed
// Todo: Experimental speed // Todo: Experimental speed