diff --git a/lib/hooks/dft.cpp b/lib/hooks/dft.cpp index b23869f19..7fcfc7a97 100644 --- a/lib/hooks/dft.cpp +++ b/lib/hooks/dft.cpp @@ -173,6 +173,7 @@ public: virtual void prepare() { MultiSignalHook::prepare(); + dumperEnable = logger->level() <= SPDLOG_LEVEL_DEBUG; signal_list_clear(&signals); @@ -253,7 +254,7 @@ public: Hook::parse(json); - ret = json_unpack_ex(json, &err, 0, "{ s?: i, s?: F, s?: F, s?: F, s?: i , s?: i, s?: s, s?: s, s?: s, s?: b, s?: i, s?: s}", + ret = json_unpack_ex(json, &err, 0, "{ s?: i, s?: F, s?: F, s?: F, s?: i, s?: i, s?: s, s?: s, s?: s, s?: b, s?: i, s?: s}", "sample_rate", &sampleRate, "start_freqency", &startFrequency, "end_freqency", &endFreqency, diff --git a/lib/hooks/gate.cpp b/lib/hooks/gate.cpp index 156beab60..91887a406 100644 --- a/lib/hooks/gate.cpp +++ b/lib/hooks/gate.cpp @@ -106,6 +106,8 @@ public: { assert(state == State::CHECKED); + SingleSignalHook::prepare(); + /* Check if signal type is float */ auto sig = (struct signal *) vlist_at(&signals, signalIndex); if (sig->type != SignalType::FLOAT) diff --git a/lib/hooks/pps_ts.cpp b/lib/hooks/pps_ts.cpp index d5e4fcdc0..beab9210d 100644 --- a/lib/hooks/pps_ts.cpp +++ b/lib/hooks/pps_ts.cpp @@ -94,8 +94,8 @@ public: const char *mode_str = nullptr; double fSmps = 0; - ret = json_unpack_ex(json, &err, 0, "{ s?: f, s: F, s?: i, s?: i }", - "mode", &mode, + ret = json_unpack_ex(json, &err, 0, "{ s?: s, s?: f, s: F, s?: i, s?: i }", + "mode", &mode_str, "threshold", &threshold, "expected_smp_rate", &fSmps, "horizon_estimation", &horizonEstimation,