Rename tune_control_s strength to volume to match Nuttx and Linux standard nomenclature for audio (loudness) control.

This commit is contained in:
mcsauder
2019-02-19 10:07:53 +01:00
committed by Beat Küng
parent 57dd1b7b45
commit 31f23c1e76
7 changed files with 47 additions and 46 deletions
+2 -2
View File
@@ -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);
+3 -3
View File
@@ -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);