mirror of
https://github.com/jankae/LibreVNA.git
synced 2025-12-06 07:12:10 +01:00
24 lines
441 B
C
24 lines
441 B
C
|
|
#ifndef AVERAGING_H
|
||
|
|
#define AVERAGING_H
|
||
|
|
|
||
|
|
|
||
|
|
#include "Device/device.h"
|
||
|
|
#include <deque>
|
||
|
|
#include <complex>
|
||
|
|
|
||
|
|
class Averaging
|
||
|
|
{
|
||
|
|
public:
|
||
|
|
Averaging();
|
||
|
|
void reset();
|
||
|
|
void setAverages(unsigned int a);
|
||
|
|
Protocol::Datapoint process(Protocol::Datapoint d);
|
||
|
|
unsigned int getLevel();
|
||
|
|
private:
|
||
|
|
std::vector<std::deque<std::array<std::complex<double>, 4>>> avg;
|
||
|
|
int maxPoints;
|
||
|
|
unsigned int averages;
|
||
|
|
};
|
||
|
|
|
||
|
|
#endif // AVERAGING_H
|