From 78fcf1dc28adc5bf4fb760228377b1df9f74afbc Mon Sep 17 00:00:00 2001 From: David Sidrane Date: Fri, 27 Jul 2018 13:28:26 -0700 Subject: [PATCH] uavcan use the specified architecture driver --- src/modules/uavcan/uavcan_main.cpp | 10 +++++----- src/modules/uavcan/uavcan_main.hpp | 2 +- src/modules/uavcan/uavcan_servers.cpp | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/modules/uavcan/uavcan_main.cpp b/src/modules/uavcan/uavcan_main.cpp index 2270e82b47..08e3b4728b 100644 --- a/src/modules/uavcan/uavcan_main.cpp +++ b/src/modules/uavcan/uavcan_main.cpp @@ -560,7 +560,7 @@ int UavcanNode::start(uavcan::NodeID node_id, uint32_t bitrate) /* * Node init */ - _instance = new UavcanNode(can->driver, uavcan_stm32::SystemClock::instance()); + _instance = new UavcanNode(can->driver, UAVCAN_DRIVER::SystemClock::instance()); if (_instance == nullptr) { PX4_ERR("Out of memory"); @@ -773,20 +773,20 @@ int UavcanNode::run() } /* When we have a system wide notion of time update (i.e the transition from the initial - * System RTC setting to the GPS) we would call uavcan_stm32::clock::setUtc() when that + * System RTC setting to the GPS) we would call UAVCAN_DRIVER::clock::setUtc() when that * happens, but for now we use adjustUtc with a correction of the hrt so that the * time bases are the same */ - uavcan_stm32::clock::adjustUtc(uavcan::UtcDuration::fromUSec(hrt_absolute_time())); + UAVCAN_DRIVER::clock::adjustUtc(uavcan::UtcDuration::fromUSec(hrt_absolute_time())); _master_timer.setCallback(TimerCallback(this, &UavcanNode::handle_time_sync)); _master_timer.startPeriodic(uavcan::MonotonicDuration::fromMSec(1000)); _node_status_monitor.start(); - const int busevent_fd = ::open(uavcan_stm32::BusEvent::DevName, 0); + const int busevent_fd = ::open(UAVCAN_DRIVER::BusEvent::DevName, 0); if (busevent_fd < 0) { - PX4_ERR("Failed to open %s", uavcan_stm32::BusEvent::DevName); + PX4_ERR("Failed to open %s", UAVCAN_DRIVER::BusEvent::DevName); _task_should_exit = true; } diff --git a/src/modules/uavcan/uavcan_main.hpp b/src/modules/uavcan/uavcan_main.hpp index dd7ff0bea3..0b5a3ba095 100644 --- a/src/modules/uavcan/uavcan_main.hpp +++ b/src/modules/uavcan/uavcan_main.hpp @@ -103,7 +103,7 @@ class UavcanNode : public device::CDev static constexpr unsigned StackSize = 2400; public: - typedef uavcan_stm32::CanInitHelper CanInitHelper; + typedef UAVCAN_DRIVER::CanInitHelper CanInitHelper; enum eServerAction {None, Start, Stop, CheckFW, Busy}; UavcanNode(uavcan::ICanDriver &can_driver, uavcan::ISystemClock &system_clock); diff --git a/src/modules/uavcan/uavcan_servers.cpp b/src/modules/uavcan/uavcan_servers.cpp index 2d97e22a7a..ed96586bc5 100644 --- a/src/modules/uavcan/uavcan_servers.cpp +++ b/src/modules/uavcan/uavcan_servers.cpp @@ -80,8 +80,8 @@ UavcanServers *UavcanServers::_instance; UavcanServers::UavcanServers(uavcan::INode &main_node) : _subnode_thread(-1), - _vdriver(NumIfaces, uavcan_stm32::SystemClock::instance(), main_node.getAllocator(), VirtualIfaceBlockAllocationQuota), - _subnode(_vdriver, uavcan_stm32::SystemClock::instance(), main_node.getAllocator()), + _vdriver(NumIfaces, UAVCAN_DRIVER::SystemClock::instance(), main_node.getAllocator(), VirtualIfaceBlockAllocationQuota), + _subnode(_vdriver, UAVCAN_DRIVER::SystemClock::instance(), main_node.getAllocator()), _main_node(main_node), _server_instance(_subnode, _storage_backend, _tracer), _fileserver_backend(_subnode),