From aaa3616c2041d3383f3a53b084c6a254da42cec1 Mon Sep 17 00:00:00 2001 From: Fred Massin Date: Fri, 1 Nov 2024 11:49:04 +0100 Subject: [PATCH] Fixing important mistake on not removing old PGA --- apps/eew/scfinder/main.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/apps/eew/scfinder/main.cpp b/apps/eew/scfinder/main.cpp index 9503281..5ba34c0 100644 --- a/apps/eew/scfinder/main.cpp +++ b/apps/eew/scfinder/main.cpp @@ -1212,6 +1212,7 @@ bool App::Buddy::updateMaximum(const Core::Time &minTime, const std::string pref for ( it = pgas.begin(); it != pgas.end(); ++it ) { // Skip if value is smaller or outdated. + if ( it->timestamp < minTime ) continue; if ( maxPGA.timestamp.valid() && it->value < maxPGA.value ) continue; // Skip if gain unit does not match the configured prevailing @@ -1220,11 +1221,11 @@ bool App::Buddy::updateMaximum(const Core::Time &minTime, const std::string pref && ( strcmp( lastMaximum.gainunit.c_str(), preferredGainUnits.c_str() ) == 0 ) && ( strcmp( it->gainunit.c_str(), preferredGainUnits.c_str() ) != 0 ) ) { - SEISCOMP_DEBUG("%s [%s] rules over %s [%s]", - lastMaximum.channel.c_str(), - lastMaximum.gainunit.c_str(), - it->channel.c_str(), - it->gainunit.c_str() ); + // SEISCOMP_DEBUG("%s [%s] rules over %s [%s]", + // lastMaximum.channel.c_str(), + // lastMaximum.gainunit.c_str(), + // it->channel.c_str(), + // it->gainunit.c_str() ); continue; }