mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-07-07 13:52:06 +08:00
ui/driverview: use common SubMaster (#29660)
This commit is contained in:
@@ -35,7 +35,7 @@ void DriverViewWindow::mouseReleaseEvent(QMouseEvent* e) {
|
||||
closeView();
|
||||
}
|
||||
|
||||
DriverViewScene::DriverViewScene(QWidget* parent) : sm({"driverStateV2"}), QWidget(parent) {
|
||||
DriverViewScene::DriverViewScene(QWidget* parent) : QWidget(parent) {
|
||||
face_img = loadPixmap("../assets/img_driver_face_static.png", {FACE_IMG_SIZE, FACE_IMG_SIZE});
|
||||
}
|
||||
|
||||
@@ -51,7 +51,6 @@ void DriverViewScene::hideEvent(QHideEvent* event) {
|
||||
|
||||
void DriverViewScene::frameUpdated() {
|
||||
frame_updated = true;
|
||||
sm.update(0);
|
||||
update();
|
||||
}
|
||||
|
||||
@@ -67,6 +66,7 @@ void DriverViewScene::paintEvent(QPaintEvent* event) {
|
||||
return;
|
||||
}
|
||||
|
||||
const auto &sm = *(uiState()->sm);
|
||||
cereal::DriverStateV2::Reader driver_state = sm["driverStateV2"].getDriverStateV2();
|
||||
cereal::DriverStateV2::DriverData::Reader driver_data;
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@ protected:
|
||||
|
||||
private:
|
||||
Params params;
|
||||
SubMaster sm;
|
||||
QPixmap face_img;
|
||||
bool is_rhd = false;
|
||||
bool frame_updated = false;
|
||||
|
||||
Reference in New Issue
Block a user