From d8df88e8b299fe697ff695f61cd1e85032530a84 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Tue, 19 Jun 2018 21:09:47 +0200 Subject: Widen frequency range of tone test --- src/common/src/Audio/tone.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/common') diff --git a/src/common/src/Audio/tone.c b/src/common/src/Audio/tone.c index 2cd97a9..60226ce 100644 --- a/src/common/src/Audio/tone.c +++ b/src/common/src/Audio/tone.c @@ -1,7 +1,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2018 Maximilien Cuony + * Copyright (c) 2018 Maximilien Cuony, Matthias P. Braendli * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -40,10 +40,10 @@ static struct tone_detector detector_1750; int TONE_1750_DETECTED = 0; static void init_tone(struct tone_detector* detector, int freq, int threshold) { - detector->coef = 2.0 * arm_cos_f32(2.0 * FLOAT_PI * freq / AUDIO_IN_RATE); + detector->coef = 2.0f * arm_cos_f32(2.0f * FLOAT_PI * freq / AUDIO_IN_RATE); detector->Q1 = 0; detector->Q2 = 0; - detector->threshold = threshold ; // 200000; + detector->threshold = threshold; detector->num_samples_analysed = 0; } -- cgit v1.2.3