feat: add ts to StepDetector

This commit is contained in:
2026-06-14 16:21:48 +02:00
parent 60a5b109bb
commit cd55709cc0
2 changed files with 11 additions and 6 deletions

View File

@@ -12,8 +12,8 @@
class StepListener {
public:
virtual ~StepListener() {}
virtual void playBeat() = 0;
virtual ~StepListener() = default;
virtual void playBeat(double t) = 0;
};
/** mean-filter the gravity vector, then take acceleration downwards */
@@ -55,8 +55,13 @@ protected:
public:
StepDetector(double fps, StepListener *listener, bool debug = false);
/**
* Push accelerometer values.
* @param ts timestamp in ns
* @param values acceleration values for x,y,z
*/
void filter(double ts, std::vector<float> values);
void filter_a(double s1);
void filter_a(double t, double s1);
std::vector<double> getBufSsd();
std::vector<double> getBufSqi();
std::vector<double> getBufOut();