diff --git a/msg/CMakeLists.txt b/msg/CMakeLists.txt index d154039e41..148caa3d0e 100644 --- a/msg/CMakeLists.txt +++ b/msg/CMakeLists.txt @@ -34,7 +34,6 @@ set(msg_files actuator_armed.msg actuator_controls.msg - actuator_direct.msg actuator_outputs.msg adc_report.msg airspeed.msg diff --git a/msg/actuator_direct.msg b/msg/actuator_direct.msg deleted file mode 100644 index 007745e90b..0000000000 --- a/msg/actuator_direct.msg +++ /dev/null @@ -1,4 +0,0 @@ -uint64 timestamp # time since system start (microseconds) -uint8 NUM_ACTUATORS_DIRECT = 16 -uint32 nvalues # number of valid values -float32[16] values # actuator values, from -1 to 1 diff --git a/msg/tools/uorb_rtps_message_ids.yaml b/msg/tools/uorb_rtps_message_ids.yaml index 07aa0095bc..612d8a210f 100644 --- a/msg/tools/uorb_rtps_message_ids.yaml +++ b/msg/tools/uorb_rtps_message_ids.yaml @@ -3,8 +3,6 @@ rtps: id: 0 - msg: actuator_controls id: 1 - - msg: actuator_direct - id: 2 - msg: actuator_outputs id: 3 - msg: adc_report diff --git a/src/drivers/uavcan/uavcan_main.cpp b/src/drivers/uavcan/uavcan_main.cpp index b8346a220c..d33eb42084 100644 --- a/src/drivers/uavcan/uavcan_main.cpp +++ b/src/drivers/uavcan/uavcan_main.cpp @@ -139,8 +139,6 @@ UavcanNode::~UavcanNode() } while (_task != -1); } - (void)orb_unsubscribe(_actuator_direct_sub); - // Removing the sensor bridges _sensor_bridges.clear(); @@ -763,8 +761,6 @@ UavcanNode::run() // XXX figure out the output count _output_count = 2; - _actuator_direct_sub = orb_subscribe(ORB_ID(actuator_direct)); - actuator_outputs_s outputs{}; // Set up the time synchronization @@ -808,14 +804,6 @@ UavcanNode::run() */ add_poll_fd(busevent_fd); - /* - * setup poll to look for actuator direct input if we are - * subscribed to the topic - */ - if (_actuator_direct_sub != -1) { - _actuator_direct_poll_fd_num = add_poll_fd(_actuator_direct_sub); - } - update_params(); while (!_task_should_exit) { @@ -886,23 +874,6 @@ UavcanNode::run() } } - // see if we have any direct actuator updates - actuator_direct_s actuator_direct{}; - - if (_actuator_direct_sub != -1 && - (_poll_fds[_actuator_direct_poll_fd_num].revents & POLLIN) && - orb_copy(ORB_ID(actuator_direct), _actuator_direct_sub, &actuator_direct) == OK && - !_test_in_progress) { - - if (actuator_direct.nvalues > actuator_outputs_s::NUM_ACTUATOR_OUTPUTS) { - actuator_direct.nvalues = actuator_outputs_s::NUM_ACTUATOR_OUTPUTS; - } - - memcpy(&outputs.output[0], &actuator_direct.values[0], actuator_direct.nvalues * sizeof(float)); - outputs.noutputs = actuator_direct.nvalues; - new_output = true; - } - // can we mix? if (_test_in_progress) { diff --git a/src/drivers/uavcan/uavcan_main.hpp b/src/drivers/uavcan/uavcan_main.hpp index 5d5c200148..ee639cf74c 100644 --- a/src/drivers/uavcan/uavcan_main.hpp +++ b/src/drivers/uavcan/uavcan_main.hpp @@ -65,15 +65,14 @@ #include #include #include -#include #include #include #include #define NUM_ACTUATOR_CONTROL_GROUPS_UAVCAN 4 -// we add two to allow for actuator_direct and busevent -#define UAVCAN_NUM_POLL_FDS (NUM_ACTUATOR_CONTROL_GROUPS_UAVCAN+2) +// we add 1 to allow for busevent +#define UAVCAN_NUM_POLL_FDS (NUM_ACTUATOR_CONTROL_GROUPS_UAVCAN+1) /** * A UAVCAN node. @@ -204,10 +203,6 @@ private: uORB::Subscription _parameter_update_sub{ORB_ID(parameter_update)}; uORB::Subscription _test_motor_sub{ORB_ID(test_motor)}; - int _actuator_direct_sub{-1}; ///< uORB subscription of the actuator_direct topic - uint8_t _actuator_direct_poll_fd_num{0}; - - perf_counter_t _cycle_perf; perf_counter_t _interval_perf; perf_counter_t _control_latency_perf; diff --git a/src/drivers/uavcanesc/uavcanesc_main.hpp b/src/drivers/uavcanesc/uavcanesc_main.hpp index 5c304c20fb..7c6fb1c040 100644 --- a/src/drivers/uavcanesc/uavcanesc_main.hpp +++ b/src/drivers/uavcanesc/uavcanesc_main.hpp @@ -48,8 +48,8 @@ #define NUM_ACTUATOR_CONTROL_GROUPS_UAVCAN 1 #define UAVCAN_DEVICE_PATH "/dev/uavcan/esc" -// we add two to allow for actuator_direct and busevent -#define UAVCAN_NUM_POLL_FDS (NUM_ACTUATOR_CONTROL_GROUPS_UAVCAN+2) +// we add 1 to allow for busevent +#define UAVCAN_NUM_POLL_FDS (NUM_ACTUATOR_CONTROL_GROUPS_UAVCAN+1) /** * A UAVCAN node. diff --git a/src/drivers/uavcannode/uavcannode_main.hpp b/src/drivers/uavcannode/uavcannode_main.hpp index 1ae9e29c6b..59ff60641c 100644 --- a/src/drivers/uavcannode/uavcannode_main.hpp +++ b/src/drivers/uavcannode/uavcannode_main.hpp @@ -51,8 +51,8 @@ #define NUM_ACTUATOR_CONTROL_GROUPS_UAVCAN 1 #define UAVCAN_DEVICE_PATH "/dev/uavcan/node" -// we add two to allow for actuator_direct and busevent -#define UAVCAN_NUM_POLL_FDS (NUM_ACTUATOR_CONTROL_GROUPS_UAVCAN+2) +// we add 1 to allow for busevent +#define UAVCAN_NUM_POLL_FDS (NUM_ACTUATOR_CONTROL_GROUPS_UAVCAN+1) /** * A UAVCAN node.