mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-30 17:50:35 +08:00
Vendor-specific status code support
This commit is contained in:
@@ -84,6 +84,7 @@ static void runForever(const uavcan_linux::NodePtr& node)
|
||||
auto do_nothing_once_a_minute = [&node](const uavcan::TimerEvent&)
|
||||
{
|
||||
node->logInfo("timer", "Another minute passed...");
|
||||
node->setVendorSpecificStatusCode(static_cast<std::uint16_t>(std::rand())); // Setting to an arbitrary value
|
||||
};
|
||||
auto timer = node->makeTimer(uavcan::MonotonicDuration::fromMSec(60000), do_nothing_once_a_minute);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user