summaryrefslogtreecommitdiff
path: root/profile.cpp
diff options
context:
space:
mode:
authorNikita Kostovsky <luntik2012@gmail.com>2025-01-12 17:57:45 +0100
committerNikita Kostovsky <luntik2012@gmail.com>2025-01-12 17:57:45 +0100
commit201d98f63131242bb8871ed0c4a3ae9ebd4ef030 (patch)
tree763a52710b3c8021c62b93535692b53de90265e5 /profile.cpp
parent4782e81c32392c78025aae1acb4b2ed1d1395908 (diff)
start refactoring. non-working commit
Diffstat (limited to 'profile.cpp')
-rw-r--r--profile.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/profile.cpp b/profile.cpp
index 31d88cd..0c4967c 100644
--- a/profile.cpp
+++ b/profile.cpp
@@ -11,6 +11,14 @@ Profile::Profile(
const CalibrationTablePtr calibrationTableX)
: m_counters(pixels.counters)
{
+ if (!calibrationTableZ || !calibrationTableX)
+ {
+ std::cerr << __func__ << ": got invalid calibration tables"
+ << std::endl;
+
+ return;
+ }
+
static bool done{false};
if (!done) {
@@ -71,8 +79,8 @@ Profile::Profile(
// TODO: use only NaN (or zero?) everywhere
// NOTE: QJsonValue converts NaN to zero
if (qFuzzyIsNull(z) || std::isnan(z)) {
- qDebug() << "got nan z for discrete" << pixelDiscrete << leftMmZ
- << rightMmZ;
+ // qDebug() << "got nan z for discrete" << pixelDiscrete << leftMmZ
+ // << rightMmZ;
m_pointsMm.at(i) = {std::nan(""), std::nan("")};
continue;
}