I'm trying to make a library, but OO is not my talent. Here is my problem:
I created the .h and .cpp files, but happens an error on compilation, on line 17 of file.cpp. In fact, if I comment this line, the build is successful.
The .h and .cpp files and error message are shown below.
#ifndef Acoustic_h
#define Acoustic_h
#include "WProgram.h"
constfloat pi = 3.141593; // valor de pi
class Acoustic
{
int signal_in; // pino de entrada do sinal analógico
float coeff; //coeficiente para a função goertzel
float f_normalized; //frequencia normalizada
float s; //variavel temporaria
float sPrev1; //variavel temporaria
float sPrev2; //variavel temporaria
int n_sample; //contador de amostras
int size; //tamanho do bloco
void goertzel(void); //filtro de goertzel, propriamente dito
public:
Acoustic(void); //construtor
float magnitude;
void set_goertzel(float f_target, float f_sample, int size_block, int pin_in); //configura os parametros usados no algoritmo de goertzel
void start_goertzel(void); //inicia coleta de amostras e calculo da magnitude
void stop_goertzel(void); //para coleta de amostras e calculo da magnitude
};
#endif