esp32-i2s-slm icon indicating copy to clipboard operation
esp32-i2s-slm copied to clipboard

Error in SOS_IIR_Filter

Open anjalir14 opened this issue 2 years ago • 1 comments

Hello,

I'm working on the ICS-43434 sensor. I want to run this code on STM32 IDE but struck over the file SOS_IIR_Filter.h and the line is struct SOS_IIR_Filter. since I'm new to C++. so, I don't know the struct constructor, can you please tell me the logic that how to convert the noise into dB?

Please reply to me as soon as possible. Thank you.

anjalir14 avatar May 09 '22 11:05 anjalir14

hello same problem I get compilation error on the structur constructor in C++ (arduino 2 esp core 5.1)

SOS_IIR_Filter INMP441 = ( gain: 1.00197834654696, sos: { // Second-Order Sections {b1, b2, -a1, -a2} { -1.986920458344451, +0.986963226946616, +1.995178510504166, -0.995184322194091 } } );

compilation give the following error

/Volumes/Data/Arduino/production/sonde_sonore_jeedom_v3/sonde_sonore_jeedom_v3.ino:166:4: error: 'gain' was not declared in this scope 166 | gain: 1.00197834654696, | ^~~~ /Volumes/Data/Arduino/production/sonde_sonore_jeedom_v3/sonde_sonore_jeedom_v3.ino:166:8: error: expected ')' before ':' token 166 | gain: 1.00197834654696, | ^ | ) /Volumes/Data/Arduino/production/sonde_sonore_jeedom_v3/sonde_sonore_jeedom_v3.ino:165:26: note: to match this '(' 165 | SOS_IIR_Filter INMP441 = ( | ^ /Volumes/Data/Arduino/production/sonde_sonore_jeedom_v3/sonde_sonore_jeedom_v3.ino:224:1: error: designated initializers cannot be used with a non-aggregate type 'SOS_IIR_Filter' 224 | }; | ^

exit status 1

Compilation error: 'gain' was not declared in this scope

fbell58 avatar Apr 11 '24 11:04 fbell58