From 201d98f63131242bb8871ed0c4a3ae9ebd4ef030 Mon Sep 17 00:00:00 2001 From: Nikita Kostovsky Date: Sun, 12 Jan 2025 17:57:45 +0100 Subject: start refactoring. non-working commit --- profile.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'profile.cpp') 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; } -- cgit v1.2.3-70-g09d2