diff options
author | mazahner <mazahner@student.ethz.ch> | 2014-11-10 17:39:04 +0100 |
---|---|---|
committer | mazahner <mazahner@student.ethz.ch> | 2014-11-10 17:39:04 +0100 |
commit | 6ec08335459457c82158d2df06050bd30fb8cc59 (patch) | |
tree | 3d5407b6bc88533eacedb3bebfc9e0c9b23609ea /src/modules/uavcan/uavcan_main.hpp | |
parent | d15203de91cc07530809060f949374bb8918daea (diff) | |
parent | 4e8e6e653beb21808f532b83c6c6e827103ea379 (diff) | |
download | px4-firmware-6ec08335459457c82158d2df06050bd30fb8cc59.tar.gz px4-firmware-6ec08335459457c82158d2df06050bd30fb8cc59.tar.bz2 px4-firmware-6ec08335459457c82158d2df06050bd30fb8cc59.zip |
Merge branch 'master' of https://github.com/mazahner/Firmware
Diffstat (limited to 'src/modules/uavcan/uavcan_main.hpp')
-rw-r--r-- | src/modules/uavcan/uavcan_main.hpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/modules/uavcan/uavcan_main.hpp b/src/modules/uavcan/uavcan_main.hpp index 443525379..be7db9741 100644 --- a/src/modules/uavcan/uavcan_main.hpp +++ b/src/modules/uavcan/uavcan_main.hpp @@ -42,8 +42,8 @@ #include <uORB/topics/actuator_outputs.h> #include <uORB/topics/actuator_armed.h> -#include "esc_controller.hpp" -#include "gnss_receiver.hpp" +#include "actuators/esc.hpp" +#include "sensors/sensor_bridge.hpp" /** * @file uavcan_main.hpp @@ -77,12 +77,10 @@ public: static int start(uavcan::NodeID node_id, uint32_t bitrate); - Node& getNode() { return _node; } + Node& get_node() { return _node; } - static int control_callback(uintptr_t handle, - uint8_t control_group, - uint8_t control_index, - float &input); + // TODO: move the actuator mixing stuff into the ESC controller class + static int control_callback(uintptr_t handle, uint8_t control_group, uint8_t control_index, float &input); void subscribe(); @@ -94,6 +92,7 @@ public: static UavcanNode* instance() { return _instance; } private: + void fill_node_info(); int init(uavcan::NodeID node_id); void node_spin_once(); int run(); @@ -108,8 +107,11 @@ private: static UavcanNode *_instance; ///< singleton pointer Node _node; ///< library instance + pthread_mutex_t _node_mutex; + UavcanEscController _esc_controller; - UavcanGnssReceiver _gnss_receiver; + + List<IUavcanSensorBridge*> _sensor_bridges; ///< List of active sensor bridges MixerGroup *_mixers = nullptr; |