mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-26 00:53:34 +08:00
Rename tune_control_s strength to volume to match Nuttx and Linux standard nomenclature for audio (loudness) control.
This commit is contained in:
@@ -145,7 +145,7 @@ void buzzer_deinit()
|
||||
void set_tune_override(int tune)
|
||||
{
|
||||
tune_control.tune_id = tune;
|
||||
tune_control.strength = tune_control_s::STRENGTH_NORMAL;
|
||||
tune_control.volume = tune_control_s::VOLUME_LEVEL_DEFAULT;
|
||||
tune_control.tune_override = 1;
|
||||
tune_control.timestamp = hrt_absolute_time();
|
||||
orb_publish(ORB_ID(tune_control), tune_control_pub, &tune_control);
|
||||
@@ -160,7 +160,7 @@ void set_tune(int tune)
|
||||
/* allow interrupting current non-repeating tune by the same tune */
|
||||
if (tune != tune_current || new_tune_duration != 0) {
|
||||
tune_control.tune_id = tune;
|
||||
tune_control.strength = tune_control_s::STRENGTH_NORMAL;
|
||||
tune_control.volume = tune_control_s::VOLUME_LEVEL_DEFAULT;
|
||||
tune_control.tune_override = 0;
|
||||
tune_control.timestamp = hrt_absolute_time();
|
||||
orb_publish(ORB_ID(tune_control), tune_control_pub, &tune_control);
|
||||
|
||||
@@ -94,10 +94,10 @@ void RC_Loss_Alarm::process()
|
||||
void RC_Loss_Alarm::play_tune()
|
||||
{
|
||||
struct tune_control_s tune_control = {};
|
||||
tune_control.tune_id = static_cast<int>(TuneID::ERROR_TUNE);
|
||||
tune_control.strength = tune_control_s::STRENGTH_MAX;
|
||||
tune_control.timestamp = hrt_absolute_time();
|
||||
tune_control.tune_id = static_cast<int>(TuneID::ERROR_TUNE);
|
||||
tune_control.tune_override = 1;
|
||||
tune_control.timestamp = hrt_absolute_time();
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user