]> Devoid-pointer.net GitWeb - anyanka.git/commitdiff
Update to changed libHPCS API
authorMichal Malý <madcatxster@devoid-pointer.net>
Fri, 11 Jul 2014 00:40:09 +0000 (02:40 +0200)
committerMichal Malý <madcatxster@devoid-pointer.net>
Fri, 11 Jul 2014 00:40:09 +0000 (02:40 +0200)
datamanager.cpp
signal.cpp
signal.h

index f80786df38ab0bf54cde10865100ccebd237964d..4d45116cd5c44d582fc39a036a65efc32d76328d 100644 (file)
@@ -349,7 +349,8 @@ std::shared_ptr<SingleRunData> DataManager::loadSingleRun(QDir& dir)
       Signal::TimeValuePair stvp(md->data[idx].time, md->data[idx].value);
       values.push_back(stvp);
     }
-    _s = std::shared_ptr<Signal>(new Signal(eqp, res, samplingRate, yu, md->dad_wavelength_msr, md->dad_wavelength_ref, values));
+    _s = std::shared_ptr<Signal>(new Signal(eqp, res, samplingRate, yu, md->dad_wavelength_msr.wavelength, md->dad_wavelength_msr.interval, md->dad_wavelength_ref.wavelength,
+                                            md->dad_wavelength_ref.interval, values));
 
     if (!date.isValid()) {
       llog->log(Logger::WARNING, ME_SENDER_STR, QString("Date ") + date.toString() + QString("is invalid."));
index 25ed6b5b3d3852d6291766e7b9d7cef083132361..d6deaf9926daef74910a276ba1b66647705662f9 100644 (file)
@@ -34,12 +34,14 @@ const QString Signal::MILLIAU_SI("mAU");
 const QString Signal::MILLIVOLTS_SI("mV");
 const QString Signal::WATTS_SI("W");
 
-Signal::Signal(const Equipment equipment, const Resource resource, const double samplingRate, const YUnit yunit, uint16_t wavelengthAbs, uint16_t wavelengthRef,
-               const std::vector<TimeValuePair>& values, QObject* parent) :
+Signal::Signal(const Equipment equipment, const Resource resource, const double samplingRate, const YUnit yunit, uint16_t wavelengthAbs, uint16_t intervalAbs,
+               uint16_t wavelengthRef, uint16_t intervalRef, const std::vector<TimeValuePair>& values, QObject* parent) :
   QObject(parent),
   m_equipment(equipment),
   m_resource(resource),
   m_samplingRate(samplingRate),
+  m_spectralIntervalAbs(intervalAbs),
+  m_spectralIntervalRef(intervalRef),
   m_values(values),
   m_wavelengthAbs(wavelengthAbs),
   m_wavelengthRef(wavelengthRef),
index c18abc7af9bcf9a60d4728f2cf85e777467e55bd..2013b17db2957fcdab1458c552fcef4b3dd94aa9 100644 (file)
--- a/signal.h
+++ b/signal.h
@@ -55,7 +55,8 @@ public:
   };
 
   explicit Signal(const Equipment equipment, const Resource resource, const double samplingRate, const YUnit yunit, const uint16_t wavelengthAbs,
-                  const uint16_t wavelengthRef, const std::vector<TimeValuePair>& values, QObject* parent = nullptr);
+                  const uint16_t intervalAbs, const uint16_t wavelengthRef, const uint16_t intervalRef, const std::vector<TimeValuePair>& values,
+                  QObject* parent = nullptr);
   uint count() const { return m_values.size(); }
   QString descriptiveName() const;
   Equipment equipment() const { return m_equipment; }
@@ -85,6 +86,8 @@ private:
   double m_min;
   const Resource m_resource;
   const double m_samplingRate;
+  const uint16_t m_spectralIntervalAbs;
+  const uint16_t m_spectralIntervalRef;
   const std::vector<TimeValuePair> m_values;
   const uint16_t m_wavelengthAbs;
   const uint16_t m_wavelengthRef;