Skip to content
This repository has been archived by the owner on Jul 21, 2024. It is now read-only.

Commit

Permalink
H3DS-82 Added UI error instead of hard fail if pipeline was not started
Browse files Browse the repository at this point in the history
  • Loading branch information
rabits committed May 3, 2021
1 parent af80a48 commit 46ac313
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/provider/realsense/rscamera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#include "src/camera/pointcloud.h"
#include "src/settings.h"
#include "src/application.h"

Q_LOGGING_CATEGORY(rscamera, "RSCamera")

Expand Down Expand Up @@ -79,7 +80,13 @@ void RSCamera::start()
qCWarning(rscamera) << "Unable to start pipe with the current configuration:" << e.what();
qCWarning(rscamera) << "Disabling the color stream and retry";
m_config.disable_stream(RS2_STREAM_COLOR);
m_profile = m_pipe->start(m_config);
try {
m_profile = m_pipe->start(m_config);
} catch( rs2::error e ) {
Application::I()->error("Unable to start pipeline for this camera. Please report to developer");
setIsStreaming(false);
return;
}
}
qCDebug(rscamera) << "get serial";
m_scanningDeviceSerial = m_profile.get_device().get_info(RS2_CAMERA_INFO_SERIAL_NUMBER);
Expand Down

0 comments on commit 46ac313

Please sign in to comment.