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

x variables are not initialised per execution of say #38

Open
kevinjwalters opened this issue May 16, 2020 · 0 comments
Open

x variables are not initialised per execution of say #38

kevinjwalters opened this issue May 16, 2020 · 0 comments

Comments

@kevinjwalters
Copy link

kevinjwalters commented May 16, 2020

The x "array" of variables which represent some intermedate values inside the filter are only initialised once when the program runs due to C/C++ rules for static variables. The code can be seen on

static int16_t x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10;

Should those be zero'd everytime at the start of say function? At the moment a second invocation of say is very likely to generate slightly different output for the same input data, albeit only briefly at the start.

Also, x10 is never used in the program.

I've not executed this code, I've just inspected it...

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

1 participant