version 4.1.0
maybe fix hang on PIEthernet::interrupt() replace piLetobe with piChangeEndian: * piChangeEndianBinary * piChangeBinary * piChangedBinary PIDiagnostics::start now accept PISystemTime instead of number add PITimer::start(PISystemTime, std::function<void()>) overload
This commit is contained in:
@@ -259,6 +259,14 @@ bool PITimer::start(PISystemTime interval) {
|
||||
}
|
||||
|
||||
|
||||
bool PITimer::start(PISystemTime interval, std::function<void()> func) {
|
||||
if (isRunning()) stopAndWait();
|
||||
setInterval(interval);
|
||||
setSlot(func);
|
||||
return start();
|
||||
}
|
||||
|
||||
|
||||
void PITimer::stopAndWait(PISystemTime timeout) {
|
||||
stop();
|
||||
thread->waitForFinish(timeout);
|
||||
|
||||
Reference in New Issue
Block a user