mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-24 15:40:31 +08:00
Replace PublicationQueued with Publication to automatically configure ORB_QUEUE_LENGTH
This commit is contained in:
@@ -124,7 +124,7 @@ int inject_failure(uint8_t unit, uint8_t type, uint8_t instance)
|
||||
|
||||
uORB::Subscription command_ack_sub{ORB_ID(vehicle_command_ack)};
|
||||
|
||||
uORB::PublicationQueued<vehicle_command_s> command_pub{ORB_ID(vehicle_command)};
|
||||
uORB::Publication<vehicle_command_s> command_pub{ORB_ID(vehicle_command)};
|
||||
vehicle_command_s command{};
|
||||
|
||||
command.command = vehicle_command_s::VEHICLE_CMD_INJECT_FAILURE;
|
||||
|
||||
@@ -58,7 +58,7 @@ static void publish_led_control(led_control_s &led_control)
|
||||
{
|
||||
led_control.timestamp = hrt_absolute_time();
|
||||
|
||||
uORB::PublicationQueued<led_control_s> led_control_pub{ORB_ID(led_control)};
|
||||
uORB::Publication<led_control_s> led_control_pub{ORB_ID(led_control)};
|
||||
led_control_pub.publish(led_control);
|
||||
}
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ void motor_test(unsigned channel, float value, uint8_t driver_instance, int time
|
||||
test_motor.driver_instance = driver_instance;
|
||||
test_motor.timeout_ms = timeout_ms;
|
||||
|
||||
uORB::PublicationQueued<test_motor_s> test_motor_pub{ORB_ID(test_motor)};
|
||||
uORB::Publication<test_motor_s> test_motor_pub{ORB_ID(test_motor)};
|
||||
test_motor_pub.publish(test_motor);
|
||||
|
||||
if (test_motor.action == test_motor_s::ACTION_STOP) {
|
||||
|
||||
@@ -60,7 +60,7 @@ static void usage();
|
||||
|
||||
static void publish_tune_control(tune_control_s &tune_control)
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user