diff --git a/src/io/pidiagnostics.cpp b/src/io/pidiagnostics.cpp index 8d460d67..029077b2 100755 --- a/src/io/pidiagnostics.cpp +++ b/src/io/pidiagnostics.cpp @@ -170,14 +170,17 @@ void PIDiagnostics::propertyChanged(const PIString &) { void PIDiagnostics::changeDisconnectTimeout(float disct) { lock(); -// if (disct != disconn_) { - disconn_ = piMaxf(disct, interval() / 1000.f); + disconn_ = piMaxf(disct, interval() / 1000.f); + if (interval() > 0) { int hist_size = piMaxi(int(disconn_ * 1000. / interval()), 1); //piCoutObj << hist_size << interval(); history_rec.resize(hist_size); history_send.resize(hist_size); -// } -// piCoutObj << hist_size << disconn_ << interval(); + } else { + history_rec.resize(1); + history_send.resize(1); + } + //piCoutObj << hist_size << disconn_ << interval(); unlock(); }