mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-13 06:50:35 +08:00
INode class. Publisher, Subscriber, ServiceServer, ServiceClient now accept INode in constructor instead of the bunch of independent params. Self NodeID now being configured via setNodeID() method instead of constructor param
This commit is contained in:
@@ -21,7 +21,7 @@ void DeadlineHandler::startWithDeadline(MonotonicTime deadline)
|
||||
|
||||
void DeadlineHandler::startWithDelay(MonotonicDuration delay)
|
||||
{
|
||||
startWithDeadline(scheduler_.getMonotonicTimestamp() + delay);
|
||||
startWithDeadline(scheduler_.getMonotonicTime() + delay);
|
||||
}
|
||||
|
||||
void DeadlineHandler::stop()
|
||||
@@ -80,7 +80,7 @@ bool DeadlineScheduler::doesExist(const DeadlineHandler* mdh) const
|
||||
return false;
|
||||
}
|
||||
|
||||
MonotonicTime DeadlineScheduler::pollAndGetMonotonicTimestamp(ISystemClock& sysclock)
|
||||
MonotonicTime DeadlineScheduler::pollAndGetMonotonicTime(ISystemClock& sysclock)
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
@@ -117,7 +117,7 @@ MonotonicTime DeadlineScheduler::getEarliestDeadline() const
|
||||
MonotonicTime Scheduler::computeDispatcherSpinDeadline(MonotonicTime spin_deadline) const
|
||||
{
|
||||
const MonotonicTime earliest = std::min(deadline_scheduler_.getEarliestDeadline(), spin_deadline);
|
||||
const MonotonicTime ts = getMonotonicTimestamp();
|
||||
const MonotonicTime ts = getMonotonicTime();
|
||||
if (earliest > ts)
|
||||
{
|
||||
if (ts - earliest > deadline_resolution_)
|
||||
@@ -148,7 +148,7 @@ int Scheduler::spin(MonotonicTime deadline)
|
||||
if (retval < 0)
|
||||
break;
|
||||
|
||||
const MonotonicTime ts = deadline_scheduler_.pollAndGetMonotonicTimestamp(getSystemClock());
|
||||
const MonotonicTime ts = deadline_scheduler_.pollAndGetMonotonicTime(getSystemClock());
|
||||
pollCleanup(ts, retval);
|
||||
if (ts >= deadline)
|
||||
break;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
namespace uavcan
|
||||
{
|
||||
|
||||
void Timer::handleDeadline(MonotonicTime current_timestamp)
|
||||
void Timer::handleDeadline(MonotonicTime current)
|
||||
{
|
||||
assert(!isRunning());
|
||||
|
||||
@@ -18,7 +18,7 @@ void Timer::handleDeadline(MonotonicTime current_timestamp)
|
||||
startWithDeadline(scheduled_time + period_);
|
||||
|
||||
// Application can re-register the timer with different params, it's OK
|
||||
handleTimerEvent(TimerEvent(scheduled_time, current_timestamp));
|
||||
handleTimerEvent(TimerEvent(scheduled_time, current));
|
||||
}
|
||||
|
||||
void Timer::startOneShotWithDeadline(MonotonicTime deadline)
|
||||
|
||||
Reference in New Issue
Block a user