telemetry overlay, memory params fix, nightrider border, GPS logging
- Telemetry status bar in onroad UI: temp, fan %, model FPS, standstill
- Fix paramsMemory usage: Params("/dev/shm/params") not "/dev/shm/params/d"
- Telemetry/VPN toggles use ToggleControl with manual paramsMemory writes
- TelemetryEnabled/VpnEnabled registered PERSISTENT, written to memory path
- GPS telemetry: telemetryd subscribes to gpsLocation at 1Hz via cereal
- Nightrider: force CameraWidget bg black to eliminate color bleed border
- Suppress "Always On Lateral active" status bar message
- Re-enable gpsd and dashcamd
- CLAUDE.md: document memory params pattern, speed_limit.calculated usage
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -411,7 +411,7 @@ void AnnotatedCameraWidget::drawHud(QPainter &p) {
|
||||
}
|
||||
|
||||
// CLEARPILOT: blinking blue circle when telemetry is recording
|
||||
if (Params().getBool("TelemetryEnabled")) {
|
||||
if (paramsMemory.getBool("TelemetryEnabled")) {
|
||||
// Blink: visible for 500ms, hidden for 500ms
|
||||
int phase = (QDateTime::currentMSecsSinceEpoch() / 500) % 2;
|
||||
if (phase == 0) {
|
||||
@@ -904,6 +904,10 @@ void AnnotatedCameraWidget::paintEvent(QPaintEvent *event) {
|
||||
} else {
|
||||
CameraWidget::updateCalibration(DEFAULT_CALIBRATION);
|
||||
}
|
||||
// CLEARPILOT: force CameraWidget bg to black in nightrider to prevent color bleed
|
||||
if (nightriderMode) {
|
||||
CameraWidget::setBackgroundColor(Qt::black);
|
||||
}
|
||||
painter.beginNativePainting();
|
||||
if (nightriderMode) {
|
||||
// CLEARPILOT: black background, no camera feed
|
||||
@@ -1075,7 +1079,8 @@ void AnnotatedCameraWidget::updateFrogPilotWidgets() {
|
||||
}
|
||||
|
||||
void AnnotatedCameraWidget::paintFrogPilotWidgets(QPainter &p) {
|
||||
if ((showAlwaysOnLateralStatusBar || showConditionalExperimentalStatusBar || roadNameUI)) {
|
||||
// CLEARPILOT: only show status bar when telemetry is enabled
|
||||
if (paramsMemory.getBool("TelemetryEnabled")) {
|
||||
drawStatusBar(p);
|
||||
}
|
||||
|
||||
@@ -1276,7 +1281,30 @@ void AnnotatedCameraWidget::drawStatusBar(QPainter &p) {
|
||||
|
||||
QString roadName = roadNameUI ? QString::fromStdString(paramsMemory.get("RoadName")) : QString();
|
||||
|
||||
if (alwaysOnLateralActive && showAlwaysOnLateralStatusBar) {
|
||||
// CLEARPILOT: telemetry status bar — show live stats when telemetry enabled
|
||||
if (paramsMemory.getBool("TelemetryEnabled")) {
|
||||
SubMaster &sm = *(uiState()->sm);
|
||||
auto deviceState = sm["deviceState"].getDeviceState();
|
||||
int maxTempC = deviceState.getMaxTempC();
|
||||
int fanPct = deviceState.getFanSpeedPercentDesired();
|
||||
bool standstill = sm["carState"].getCarState().getStandstill();
|
||||
|
||||
static double last_model_status_t = 0;
|
||||
static float model_status_fps = 0;
|
||||
if (sm.updated("modelV2")) {
|
||||
double now = millis_since_boot();
|
||||
if (last_model_status_t > 0) {
|
||||
double dt = now - last_model_status_t;
|
||||
if (dt > 0) model_status_fps = model_status_fps * 0.8 + (1000.0 / dt) * 0.2;
|
||||
}
|
||||
last_model_status_t = now;
|
||||
}
|
||||
|
||||
newStatus = QString("%1\u00B0C FAN %2% MDL %3")
|
||||
.arg(maxTempC).arg(fanPct).arg(model_status_fps, 0, 'f', 0);
|
||||
if (standstill) newStatus += " STANDSTILL";
|
||||
// CLEARPILOT: suppress "Always On Lateral active" status bar message
|
||||
} else if (false && alwaysOnLateralActive && showAlwaysOnLateralStatusBar) {
|
||||
newStatus = tr("Always On Lateral active") + (tr(". Press the \"Cruise Control\" button to disable"));
|
||||
} else if (showConditionalExperimentalStatusBar) {
|
||||
newStatus = conditionalStatusMap[status != STATUS_DISENGAGED ? conditionalStatus : 0];
|
||||
|
||||
Reference in New Issue
Block a user