Skip to content

Commit

Permalink
Fixing important mistake on not removing old PGA
Browse files Browse the repository at this point in the history
  • Loading branch information
FMassin committed Nov 1, 2024
1 parent b37e120 commit aaa3616
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions apps/eew/scfinder/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
}

Expand Down

0 comments on commit aaa3616

Please sign in to comment.