From ba2f7de9d8e44808ec2b3db6519ad179d6a7a5ff Mon Sep 17 00:00:00 2001 From: Pavel Kirienko Date: Sun, 21 Jun 2015 03:39:45 +0300 Subject: [PATCH] Scheduler: spin deadline computation fix --- libuavcan/src/node/uc_scheduler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libuavcan/src/node/uc_scheduler.cpp b/libuavcan/src/node/uc_scheduler.cpp index 5901fe75c5..529d94ccc6 100644 --- a/libuavcan/src/node/uc_scheduler.cpp +++ b/libuavcan/src/node/uc_scheduler.cpp @@ -132,7 +132,7 @@ MonotonicTime Scheduler::computeDispatcherSpinDeadline(MonotonicTime spin_deadli const MonotonicTime ts = getMonotonicTime(); if (earliest > ts) { - if (ts - earliest > deadline_resolution_) + if (earliest - ts > deadline_resolution_) { return ts + deadline_resolution_; }