Replace PublicationQueued with Publication to automatically configure ORB_QUEUE_LENGTH

This commit is contained in:
FengShun
2020-10-26 13:01:13 +01:00
committed by Beat Küng
parent 90c366f369
commit eac9a6b68b
46 changed files with 58 additions and 68 deletions
@@ -101,7 +101,7 @@ public:
private:
// Publishers
uORB::PublicationQueued<vehicle_command_ack_s> _command_ack_pub{ORB_ID(vehicle_command_ack)};
uORB::Publication<vehicle_command_ack_s> _command_ack_pub{ORB_ID(vehicle_command_ack)};
uORB::Publication<camera_trigger_s> _trigger_pub{ORB_ID(camera_trigger)};
// Subscribers
@@ -179,7 +179,7 @@ private:
orb_advert_t _trigger_pub;
uORB::PublicationQueued<vehicle_command_ack_s> _cmd_ack_pub{ORB_ID(vehicle_command_ack)};
uORB::Publication<vehicle_command_ack_s> _cmd_ack_pub{ORB_ID(vehicle_command_ack)};
param_t _p_mode;
param_t _p_activation_time;
@@ -504,7 +504,7 @@ CameraTrigger::test()
vcmd.param5 = 1.0;
vcmd.command = vehicle_command_s::VEHICLE_CMD_DO_DIGICAM_CONTROL;
uORB::PublicationQueued<vehicle_command_s> vcmd_pub{ORB_ID(vehicle_command)};
uORB::Publication<vehicle_command_s> vcmd_pub{ORB_ID(vehicle_command)};
vcmd_pub.publish(vcmd);
}
+1 -1
View File
@@ -176,7 +176,7 @@ private:
const Instance _instance;
uORB::Subscription _orb_inject_data_sub{ORB_ID(gps_inject_data)};
uORB::PublicationQueued<gps_dump_s> _dump_communication_pub{ORB_ID(gps_dump)};
uORB::Publication<gps_dump_s> _dump_communication_pub{ORB_ID(gps_dump)};
gps_dump_s *_dump_to_device{nullptr};
gps_dump_s *_dump_from_device{nullptr};
bool _should_dump_communication{false}; ///< if true, dump communication
+1 -1
View File
@@ -162,7 +162,7 @@ private:
char _device[20];
orb_advert_t _t_outputs;
orb_advert_t _t_esc_status;
uORB::PublicationQueued<tune_control_s> _tune_control_pub{ORB_ID(tune_control)};
uORB::Publication<tune_control_s> _tune_control_pub{ORB_ID(tune_control)};
unsigned int _num_outputs;
bool _primary_pwm_device;
bool _motortest;
+2 -2
View File
@@ -713,7 +713,7 @@ PX4IO::init()
vcmd.command = vehicle_command_s::VEHICLE_CMD_DO_FLIGHTTERMINATION;
/* send command once */
uORB::PublicationQueued<vehicle_command_s> vcmd_pub{ORB_ID(vehicle_command)};
uORB::Publication<vehicle_command_s> vcmd_pub{ORB_ID(vehicle_command)};
vcmd_pub.publish(vcmd);
/* spin here until IO's state has propagated into the system */
@@ -746,7 +746,7 @@ PX4IO::init()
vcmd.command = vehicle_command_s::VEHICLE_CMD_COMPONENT_ARM_DISARM;
/* send command once */
uORB::PublicationQueued<vehicle_command_s> vcmd_pub{ORB_ID(vehicle_command)};
uORB::Publication<vehicle_command_s> vcmd_pub{ORB_ID(vehicle_command)};
vcmd_pub.publish(vcmd);
/* spin here until IO's state has propagated into the system */
+1 -1
View File
@@ -648,7 +648,7 @@ int RCInput::custom_command(int argc, char *argv[])
const char *verb = argv[0];
if (!strcmp(verb, "bind")) {
uORB::PublicationQueued<vehicle_command_s> vehicle_command_pub{ORB_ID(vehicle_command)};
uORB::Publication<vehicle_command_s> vehicle_command_pub{ORB_ID(vehicle_command)};
vehicle_command_s vcmd{};
vcmd.command = vehicle_command_s::VEHICLE_CMD_START_RX_PAIR;
vcmd.timestamp = hrt_absolute_time();
+2 -2
View File
@@ -79,8 +79,8 @@ private:
uORB::Subscription _armed_sub{ORB_ID(actuator_armed)};
uORB::Publication<safety_s> _to_safety{ORB_ID(safety)};
uORB::PublicationQueued<vehicle_command_s> _to_command{ORB_ID(vehicle_command)};
uORB::PublicationQueued<led_control_s> _to_led_control{ORB_ID(led_control)};
uORB::Publication<vehicle_command_s> _to_command{ORB_ID(vehicle_command)};
uORB::Publication<led_control_s> _to_led_control{ORB_ID(led_control)};
uORB::Publication<tune_control_s> _to_tune_control{ORB_ID(tune_control)};
safety_s _safety{};
+1 -1
View File
@@ -166,7 +166,7 @@ void ToneAlarm::Run()
} else if (_play_tone && !tune_control.tune_override) {
// otherwise re-publish tune to process next
PX4_DEBUG("tune already playing, requeing tune: %d", tune_control.tune_id);
uORB::PublicationQueued<tune_control_s> tune_control_pub{ORB_ID(tune_control)};
uORB::Publication<tune_control_s> tune_control_pub{ORB_ID(tune_control)};
tune_control.timestamp = hrt_absolute_time();
tune_control_pub.publish(tune_control);
}
+1 -1
View File
@@ -163,7 +163,7 @@ private:
// uORB topic handle for MAVLink parameter responses
uORB::Publication<uavcan_parameter_value_s> _param_response_pub{ORB_ID(uavcan_parameter_value)};
uORB::PublicationQueued<vehicle_command_ack_s> _command_ack_pub{ORB_ID(vehicle_command_ack)};
uORB::Publication<vehicle_command_ack_s> _command_ack_pub{ORB_ID(vehicle_command_ack)};
typedef uavcan::MethodBinder<UavcanServers *,
void (UavcanServers::*)(const uavcan::ServiceCallResult<uavcan::protocol::param::GetSet> &)> GetSetCallback;