migrate to PIP v4

This commit is contained in:
2024-07-30 14:18:39 +03:00
parent 472591fbf8
commit 4f006072e8
3 changed files with 9 additions and 7 deletions

View File

@@ -4,6 +4,7 @@
#include "piconfig.h"
#include "piiobytearray.h"
#include "piiostring.h"
#include "piliterals_time.h"
using namespace CDUtils;
@@ -90,10 +91,10 @@ CDCore::CDCore() {
CDCore::~CDCore() {
x_timer.stop();
x_timer.stopAndWait();
datatr.stop();
sendt.stop();
sendt.waitForFinish(10);
sendt.waitForFinish(100_ms);
connection.stop();
}
@@ -213,7 +214,7 @@ void CDCore::init(const PIString & configuration, bool pult) {
void CDCore::stop() {
x_timer.stop();
x_timer.stopAndWait();
connection.stop();
}
@@ -226,12 +227,12 @@ void CDCore::release() {
void CDCore::startX(double freq) {
// piCout << "start x" << x_timer.isRunning() << freq;
if (!x_timer.isRunning()) x_timer.start(1000. / piMaxd(freq, 0.01));
if (!x_timer.isRunning()) x_timer.start(piMax(PISystemTime::Frequency::fromHertz(freq), 0.01_Hz));
}
void CDCore::stopX() {
x_timer.stop();
x_timer.stopAndWait();
}