Hi guys, i using the okapi library from pros, to filter readings of my sensors, and i dont have any problems to using that fuction cause a i read the documentation.
I used to organize my project creating headears files and cpp files, for example i make a headear file call it, “Motors_sensors.h”
For example inside that hedear file i put:
extern pros::Motor Leftmotor;
And i create a cpp file call it “Motors_sensors.cpp” and i put:
pros::Motor Leftmotor (port, gearing, reverse?, encoder_units);
With that i can make a reference to the motor in any other file, and that is helpful for fuctions or another things.
So i want to make the same thing with okapi library, but i have an error, i tried to do this think and didnt work .
In a hedear file:
extern okapi::EMafilter ema_filter;
In a cpp file:
okapi::EMAfilter ema_filter(.25);
but i have an error, do you know how i can fix this, i really like be able to use my filter variable in another files