From f46914a95864f567b82ce2b7993393a30cd1a63f Mon Sep 17 00:00:00 2001 From: boblark Date: Fri, 13 May 2022 21:37:47 -0700 Subject: [PATCH] Corrected missing power calculation --- analyze_tonedetect_F32.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/analyze_tonedetect_F32.cpp b/analyze_tonedetect_F32.cpp index 5e84cae..86affea 100644 --- a/analyze_tonedetect_F32.cpp +++ b/analyze_tonedetect_F32.cpp @@ -112,7 +112,7 @@ AudioAnalyzeToneDetect_F32::operator bool() { q2 = out2; len = length; __enable_irq(); - + power = q1*q1 + q2*q2 - q1*q2*coef; trigger = (float)len * thresh; trigger *= trigger; //Serial.println("bool: power, trigger = "); Serial.print(power, 6); Serial.print(", "); Serial.println(trigger, 6);