fix: fan 100% on overheat, FCW fps-aware, commIssue suppress, 10min shutdown

- Fan controller: allow full 100% fan when offroad temp >= 75°C (startup cooling)
- ModelFps memory param: modeld publishes actual FPS (20 or 4) so downstream
  consumers can adjust frame-rate-dependent logic
- Longitudinal planner: dynamically adjusts dt and v_desired_filter based on
  ModelFps; FCW crash_cnt threshold scales with FPS to maintain consistent
  0.15s trigger window at both 20fps and 4fps
- controlsd: suppress commIssue alerts for 2s after lateral control engages
  (FPS transition from 4->20 causes transient freq check failures)
- Shutdown timer: hardcoded to 10 minutes (was 45min via FrogPilot param),
  screen taps reset the countdown via ShutdownTouchReset memory param,
  removed Shutdown Timer UI selector from ClearPilot menu

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-16 16:29:42 -05:00
parent 2331aa00a0
commit 1eb8d41454
12 changed files with 62 additions and 38 deletions

View File

@@ -179,13 +179,6 @@ static const char *clpSidebarBtnStyle = R"(
// clpActionBtnStyle removed — no longer used
// Shutdown timer: param value -> display label
static QString shutdownLabel(int val) {
if (val == 0) return "5 mins";
if (val <= 3) return QString::number(val * 15) + " mins";
int hours = val - 3;
return QString::number(hours) + (hours == 1 ? " hour" : " hours");
}
ClearPilotPanel::ClearPilotPanel(QWidget* parent) : QFrame(parent) {
// Sidebar
@@ -256,27 +249,6 @@ ClearPilotPanel::ClearPilotPanel(QWidget* parent) : QFrame(parent) {
});
general_panel->addItem(resetCalibBtn);
// Shutdown Timer
int cur_shutdown = Params().getInt("DeviceShutdown");
auto shutdownBtn = new ButtonControl("Shutdown Timer", shutdownLabel(cur_shutdown),
"How long the device stays on after the car is turned off.");
connect(shutdownBtn, &ButtonControl::clicked, [=]() {
QStringList options;
for (int i = 0; i <= 33; i++) {
options << shutdownLabel(i);
}
int current = Params().getInt("DeviceShutdown");
QString sel = MultiOptionDialog::getSelection("Shutdown Timer", options, shutdownLabel(current), this);
if (!sel.isEmpty()) {
int idx = options.indexOf(sel);
if (idx >= 0) {
Params().putInt("DeviceShutdown", idx);
shutdownBtn->setValue(shutdownLabel(idx));
}
}
});
general_panel->addItem(shutdownBtn);
// Power buttons
QHBoxLayout *power_layout = new QHBoxLayout();
power_layout->setSpacing(30);

Binary file not shown.

View File

@@ -172,12 +172,15 @@ bool MainWindow::eventFilter(QObject *obj, QEvent *event) {
case QEvent::MouseButtonPress:
case QEvent::MouseMove: {
// CLEARPILOT: tap while screen-off (mode 3) -> wake to auto-normal (mode 0)
Params pmem{"/dev/shm/params"};
if (!device()->isAwake()) {
Params pmem{"/dev/shm/params"};
if (pmem.getInt("ScreenDisplayMode") == 3) {
pmem.putInt("ScreenDisplayMode", 0);
}
}
// CLEARPILOT: reset shutdown timer on any screen touch
static int touch_counter = 0;
pmem.put("ShutdownTouchReset", std::to_string(++touch_counter));
// ignore events when device is awakened by resetInteractiveTimeout
ignore = !device()->isAwake();
device()->resetInteractiveTimeout(uiState()->scene.screen_timeout, uiState()->scene.screen_timeout_onroad);