Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in SOS_IIR_Filter #15

Open
anjalir14 opened this issue May 9, 2022 · 1 comment
Open

Error in SOS_IIR_Filter #15

anjalir14 opened this issue May 9, 2022 · 1 comment

Comments

@anjalir14
Copy link

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.

@fbell58
Copy link

fbell58 commented Apr 11, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants