From b9aa2c232febf25b9fbb188f09b1a60482e39031 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Wed, 12 Jul 2023 13:09:42 -0700 Subject: [PATCH] ui: fix timeout typo (#28905) tim is out -> timeout old-commit-hash: d68bd905fc9440352007e115c0f46dc9c0b4e402 --- selfdrive/ui/qt/window.cc | 6 +++--- selfdrive/ui/ui.cc | 8 ++++---- selfdrive/ui/ui.h | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/selfdrive/ui/qt/window.cc b/selfdrive/ui/qt/window.cc index 705c2f217..e8714ff34 100644 --- a/selfdrive/ui/qt/window.cc +++ b/selfdrive/ui/qt/window.cc @@ -38,7 +38,7 @@ MainWindow::MainWindow(QWidget *parent) : QWidget(parent) { closeSettings(); } }); - QObject::connect(&device, &Device::interactiveTimout, [=]() { + QObject::connect(&device, &Device::interactiveTimeout, [=]() { if (main_layout->currentWidget() == settingsWindow) { closeSettings(); } @@ -90,9 +90,9 @@ bool MainWindow::eventFilter(QObject *obj, QEvent *event) { case QEvent::TouchEnd: case QEvent::MouseButtonPress: case QEvent::MouseMove: { - // ignore events when device is awakened by resetInteractiveTimout + // ignore events when device is awakened by resetInteractiveTimeout ignore = !uiState()->awake; - device.resetInteractiveTimout(); + device.resetInteractiveTimeout(); break; } default: diff --git a/selfdrive/ui/ui.cc b/selfdrive/ui/ui.cc index c4586c1ff..e9e5675e0 100644 --- a/selfdrive/ui/ui.cc +++ b/selfdrive/ui/ui.cc @@ -275,7 +275,7 @@ void UIState::setPrimeType(int type) { Device::Device(QObject *parent) : brightness_filter(BACKLIGHT_OFFROAD, BACKLIGHT_TS, BACKLIGHT_DT), QObject(parent) { setAwake(true); - resetInteractiveTimout(); + resetInteractiveTimeout(); QObject::connect(uiState(), &UIState::uiUpdate, this, &Device::update); } @@ -297,7 +297,7 @@ void Device::setAwake(bool on) { } } -void Device::resetInteractiveTimout() { +void Device::resetInteractiveTimeout() { interactive_timeout = (ignition_on ? 10 : 30) * UI_FREQ; } @@ -335,9 +335,9 @@ void Device::updateWakefulness(const UIState &s) { ignition_on = s.scene.ignition; if (ignition_just_turned_off) { - resetInteractiveTimout(); + resetInteractiveTimeout(); } else if (interactive_timeout > 0 && --interactive_timeout == 0) { - emit interactiveTimout(); + emit interactiveTimeout(); } setAwake(s.scene.ignition || interactive_timeout > 0); diff --git a/selfdrive/ui/ui.h b/selfdrive/ui/ui.h index 2519f8ea2..3f11b1bcb 100644 --- a/selfdrive/ui/ui.h +++ b/selfdrive/ui/ui.h @@ -203,10 +203,10 @@ private: signals: void displayPowerChanged(bool on); - void interactiveTimout(); + void interactiveTimeout(); public slots: - void resetInteractiveTimout(); + void resetInteractiveTimeout(); void update(const UIState &s); };