Corrected missing power calculation

pull/13/head
boblark 3 years ago
parent 4dc9715961
commit f46914a958
  1. 2
      analyze_tonedetect_F32.cpp

@ -112,7 +112,7 @@ AudioAnalyzeToneDetect_F32::operator bool() {
q2 = out2; q2 = out2;
len = length; len = length;
__enable_irq(); __enable_irq();
power = q1*q1 + q2*q2 - q1*q2*coef;
trigger = (float)len * thresh; trigger = (float)len * thresh;
trigger *= trigger; trigger *= trigger;
//Serial.println("bool: power, trigger = "); Serial.print(power, 6); Serial.print(", "); Serial.println(trigger, 6); //Serial.println("bool: power, trigger = "); Serial.print(power, 6); Serial.print(", "); Serial.println(trigger, 6);

Loading…
Cancel
Save