Fixed rounding bug when calculating Goertzel coefficents
Fixed rounding bug when calculating Goertzel coefficents

file:a/makefile -> file:b/makefile
--- a/makefile
+++ b/makefile
@@ -11,7 +11,7 @@
 CC=gcc
 CFLAGS=-O3 -Wall
 
-.PHONY: build disable-float
+.PHONY: build
 build: create-dirs all
 
 all: bin/psk31 bin/filter_test bin/packet bin/sound_device bin/NOAA_ATP bin/mixer bin/forward

--- a/src/packet/AFSK_Demodulator.c
+++ b/src/packet/AFSK_Demodulator.c
@@ -18,8 +18,8 @@
 	/*
 	 * Calculate Goertzel coefficents for calculating frequency magnitudes
 	 */
-	float k0 = (int)(0.5+((float)self->window*self->frequency_0/self->sample_rate));
-	float k1 = (int)(0.5+((float)self->window*self->frequency_1/self->sample_rate));
+	float k0 = ((float)self->window*self->frequency_0/self->sample_rate);
+	float k1 = ((float)self->window*self->frequency_1/self->sample_rate);
 	float w0 = (2*PI/self->window)*k0;
 	float w1 = (2*PI/self->window)*k1;
 
@@ -149,7 +149,7 @@
 			 * file for analysis
 			 */
 			#ifdef __DEBUG
-				fputc(fcd_avg/10000, fourier_coefficient_debug);
+				fputc(fcd_avg, fourier_coefficient_debug);
 			#endif
 
 			uint8_t current_value = 0;