migrate to PIP v4
This commit is contained in:
@@ -12,7 +12,7 @@ if ("x${CMAKE_MODULE_PATH}" STREQUAL "x")
|
|||||||
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package(PIP REQUIRED)
|
find_package(PIP 4.0 REQUIRED)
|
||||||
find_package(QAD)
|
find_package(QAD)
|
||||||
include(SHSTKMacros)
|
include(SHSTKMacros)
|
||||||
shstk_begin_project(CD)
|
shstk_begin_project(CD)
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
#include "piconfig.h"
|
#include "piconfig.h"
|
||||||
#include "piiobytearray.h"
|
#include "piiobytearray.h"
|
||||||
#include "piiostring.h"
|
#include "piiostring.h"
|
||||||
|
#include "piliterals_time.h"
|
||||||
|
|
||||||
using namespace CDUtils;
|
using namespace CDUtils;
|
||||||
|
|
||||||
@@ -90,10 +91,10 @@ CDCore::CDCore() {
|
|||||||
|
|
||||||
|
|
||||||
CDCore::~CDCore() {
|
CDCore::~CDCore() {
|
||||||
x_timer.stop();
|
x_timer.stopAndWait();
|
||||||
datatr.stop();
|
datatr.stop();
|
||||||
sendt.stop();
|
sendt.stop();
|
||||||
sendt.waitForFinish(10);
|
sendt.waitForFinish(100_ms);
|
||||||
connection.stop();
|
connection.stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -213,7 +214,7 @@ void CDCore::init(const PIString & configuration, bool pult) {
|
|||||||
|
|
||||||
|
|
||||||
void CDCore::stop() {
|
void CDCore::stop() {
|
||||||
x_timer.stop();
|
x_timer.stopAndWait();
|
||||||
connection.stop();
|
connection.stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -226,12 +227,12 @@ void CDCore::release() {
|
|||||||
|
|
||||||
void CDCore::startX(double freq) {
|
void CDCore::startX(double freq) {
|
||||||
// piCout << "start x" << x_timer.isRunning() << 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() {
|
void CDCore::stopX() {
|
||||||
x_timer.stop();
|
x_timer.stopAndWait();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
#include "cdutils_m.h"
|
#include "cdutils_m.h"
|
||||||
#include "cdutils_x.h"
|
#include "cdutils_x.h"
|
||||||
#include "k_description.h"
|
#include "k_description.h"
|
||||||
|
#include "piliterals_time.h"
|
||||||
#include "pip.h"
|
#include "pip.h"
|
||||||
|
|
||||||
using namespace CDUtils;
|
using namespace CDUtils;
|
||||||
@@ -68,7 +69,7 @@ public:
|
|||||||
}
|
}
|
||||||
EVENT_HANDLER(void, xrecv) {
|
EVENT_HANDLER(void, xrecv) {
|
||||||
piCout << "received x";
|
piCout << "received x";
|
||||||
if (!timer.isRunning()) timer.start(10);
|
if (!timer.isRunning()) timer.start(100_Hz);
|
||||||
X.start();
|
X.start();
|
||||||
}
|
}
|
||||||
EVENT_HANDLER(void, timerDone) { test(); }
|
EVENT_HANDLER(void, timerDone) { test(); }
|
||||||
|
|||||||
Reference in New Issue
Block a user