Limited ErrorPlotter buffer size
This commit is contained in:
parent
0f7c617f9c
commit
c5fbe764a6
2 changed files with 7 additions and 0 deletions
|
@ -28,6 +28,11 @@ void ErrorPlotter::clear()
|
|||
|
||||
void ErrorPlotter::addErrorValue(double errorValue)
|
||||
{
|
||||
if (m_errorValues.size() == m_bufferSize)
|
||||
{
|
||||
m_errorValues.pop_front();
|
||||
}
|
||||
|
||||
m_errorValues.push_back(errorValue);
|
||||
m_maxErrorValue = std::max<double>(m_maxErrorValue, errorValue);
|
||||
|
||||
|
|
|
@ -11,6 +11,8 @@ private:
|
|||
std::list<double> m_errorValues;
|
||||
double m_maxErrorValue;
|
||||
|
||||
size_t m_bufferSize = 10000;
|
||||
|
||||
public:
|
||||
explicit ErrorPlotter(QWidget *parent = 0);
|
||||
|
||||
|
|
Loading…
Reference in a new issue