Skip to content

Commit

Permalink
driverview
Browse files Browse the repository at this point in the history
  • Loading branch information
ZwX1616 committed Jun 9, 2022
1 parent 074f614 commit 222d129
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions selfdrive/ui/qt/offroad/driverview.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ DriverViewScene::DriverViewScene(QWidget* parent) : sm({"driverStateV2"}), QWidg

void DriverViewScene::showEvent(QShowEvent* event) {
frame_updated = false;
is_rhd = params.getBool("IsRHD");
params.putBool("IsDriverViewEnabled", true);
}

Expand Down Expand Up @@ -60,7 +59,7 @@ void DriverViewScene::paintEvent(QPaintEvent* event) {
cereal::DriverStateV2::Reader driver_state = sm["driverStateV2"].getDriverStateV2();
cereal::DriverStateV2::DriverData::Reader driver_data;

// is_rhd = driver_state.getWheelOnRightProb() > 0.5;
is_rhd = driver_state.getWheelOnRightProb() > 0.5;
driver_data = is_rhd ? driver_state.getRightDriverData() : driver_state.getLeftDriverData();

bool face_detected = driver_data.getFaceProb() > 0.5;
Expand Down

0 comments on commit 222d129

Please sign in to comment.