depthai: fixed app freezing if oakd device (oak-d lite) doesn't have imu and imu is requested.

This commit is contained in:
matlabbe
2022-10-24 11:13:27 -07:00
parent a8cdf1f940
commit df888962f4
3 changed files with 45 additions and 31 deletions

View File

@@ -3931,9 +3931,10 @@ void PreferencesDialog::selectSourceDriver(Src src, int variant)
// disable IMU filtering (zed sends already quaternion)
_ui->comboBox_imuFilter_strategy->setCurrentIndex(0);
}
else if(src == kSrcStereoDepthAI) // OAK-D, OAK-D Lite
else if(src == kSrcStereoDepthAI) // OAK-D (variant==1), OAK-D Lite (variant==0)
{
_ui->checkBox_depthai_imu_published->setChecked(variant == 1);
_ui->comboBox_depthai_resolution->setCurrentIndex(variant == 1?1:3);
}
}
else if(src >= kSrcRGB && src<kSrcDatabase)