mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-31 06:01:37 +08:00
Explicit 'virtual' for implemented methods
This commit is contained in:
@@ -63,7 +63,7 @@ public:
|
|||||||
, gradual_adj_cnt_(0)
|
, gradual_adj_cnt_(0)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
uavcan::MonotonicTime getMonotonic() const
|
virtual uavcan::MonotonicTime getMonotonic() const
|
||||||
{
|
{
|
||||||
struct timespec ts;
|
struct timespec ts;
|
||||||
if (clock_gettime(CLOCK_MONOTONIC, &ts) != 0)
|
if (clock_gettime(CLOCK_MONOTONIC, &ts) != 0)
|
||||||
@@ -73,7 +73,7 @@ public:
|
|||||||
return uavcan::MonotonicTime::fromUSec(uint64_t(ts.tv_sec) * 1000000UL + ts.tv_nsec / 1000UL);
|
return uavcan::MonotonicTime::fromUSec(uint64_t(ts.tv_sec) * 1000000UL + ts.tv_nsec / 1000UL);
|
||||||
}
|
}
|
||||||
|
|
||||||
uavcan::UtcTime getUtc() const
|
virtual uavcan::UtcTime getUtc() const
|
||||||
{
|
{
|
||||||
timeval tv;
|
timeval tv;
|
||||||
if (gettimeofday(&tv, NULL) != 0)
|
if (gettimeofday(&tv, NULL) != 0)
|
||||||
@@ -88,7 +88,7 @@ public:
|
|||||||
return utc;
|
return utc;
|
||||||
}
|
}
|
||||||
|
|
||||||
void adjustUtc(uavcan::UtcDuration adjustment)
|
virtual void adjustUtc(uavcan::UtcDuration adjustment)
|
||||||
{
|
{
|
||||||
if (adj_mode_ == ClockAdjustmentMode::PerDriverPrivate)
|
if (adj_mode_ == ClockAdjustmentMode::PerDriverPrivate)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user