mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 19:03:33 +08:00
tune_control: use orb queue advertisement consistently
This commit is contained in:
@@ -145,7 +145,7 @@ int buzzer_init()
|
||||
tune_durations[TONE_BATTERY_WARNING_FAST_TUNE] = 800000;
|
||||
tune_durations[TONE_BATTERY_WARNING_SLOW_TUNE] = 800000;
|
||||
tune_durations[TONE_SINGLE_BEEP_TUNE] = 300000;
|
||||
tune_control_pub = orb_advertise(ORB_ID(tune_control), &tune_control);
|
||||
tune_control_pub = orb_advertise_queue(ORB_ID(tune_control), &tune_control, tune_control_s::ORB_QUEUE_LENGTH);
|
||||
return PX4_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ void RC_Loss_Alarm::play_tune()
|
||||
tune_control.volume = tune_control_s::VOLUME_LEVEL_MAX;
|
||||
|
||||
if (_tune_control_pub == nullptr) {
|
||||
_tune_control_pub = orb_advertise(ORB_ID(tune_control), &tune_control);
|
||||
_tune_control_pub = orb_advertise_queue(ORB_ID(tune_control), &tune_control, tune_control_s::ORB_QUEUE_LENGTH);
|
||||
|
||||
} else {
|
||||
orb_publish(ORB_ID(tune_control), _tune_control_pub, &tune_control);
|
||||
@@ -118,7 +118,7 @@ void RC_Loss_Alarm::stop_tune()
|
||||
tune_control.timestamp = hrt_absolute_time();
|
||||
|
||||
if (_tune_control_pub == nullptr) {
|
||||
_tune_control_pub = orb_advertise(ORB_ID(tune_control), &tune_control);
|
||||
_tune_control_pub = orb_advertise_queue(ORB_ID(tune_control), &tune_control, tune_control_s::ORB_QUEUE_LENGTH);
|
||||
|
||||
} else {
|
||||
orb_publish(ORB_ID(tune_control), _tune_control_pub, &tune_control);
|
||||
|
||||
Reference in New Issue
Block a user