This commit is contained in:
Your Name
2024-02-13 04:08:13 -06:00
parent dc9dfa03e9
commit ee9802a513
2 changed files with 7 additions and 3 deletions

View File

@@ -60,7 +60,7 @@ BodyWindow::BodyWindow(QWidget *parent) : QWidget(parent) {
} }
)"); )");
notifier = new QSocketNotifier(fileno(stdin), QSocketNotifier::Read); // notifier = new QSocketNotifier(fileno(stdin), QSocketNotifier::Read);
QObject::connect(uiState(), &UIState::uiUpdate, this, &BodyWindow::updateState); QObject::connect(uiState(), &UIState::uiUpdate, this, &BodyWindow::updateState);
} }
@@ -115,11 +115,11 @@ void BodyWindow::updateState(const UIState &s) {
// } // }
// } // }
// void BodyWindow::offroadTransition(bool offroad) { void BodyWindow::offroadTransition(bool offroad) {
// btn->setChecked(true); // btn->setChecked(true);
// btn->setEnabled(true); // btn->setEnabled(true);
// fuel_filter.reset(1.0); // fuel_filter.reset(1.0);
// } }
// void BodyWindow::updateState(const UIState &s) { // void BodyWindow::updateState(const UIState &s) {
// if (!isVisible()) { // if (!isVisible()) {

View File

@@ -40,6 +40,10 @@ public:
BodyWindow(QWidget* parent = 0); BodyWindow(QWidget* parent = 0);
private: private:
void paintEvent(QPaintEvent*) override; void paintEvent(QPaintEvent*) override;
private slots:
void updateState(const UIState &s);
void offroadTransition(bool onroad);
};
}; };
// bool charging = false; // bool charging = false;