aboutsummaryrefslogtreecommitdiff
path: root/src/systemcmds
diff options
context:
space:
mode:
authorJean Cyr <jcyr@dillobits.com>2013-08-30 20:12:35 -0400
committerJean Cyr <jcyr@dillobits.com>2013-08-30 20:12:35 -0400
commitefca6f2cb1848523969c7f29abba7389e48affbc (patch)
tree1e8f75de96fd3a61452d43a270d0c1683ba9f9c1 /src/systemcmds
parent2b62497fb5dd83db17b1d2851f686049841faa7e (diff)
downloadpx4-firmware-efca6f2cb1848523969c7f29abba7389e48affbc.tar.gz
px4-firmware-efca6f2cb1848523969c7f29abba7389e48affbc.tar.bz2
px4-firmware-efca6f2cb1848523969c7f29abba7389e48affbc.zip
Remove unused tones and save about 6K flash space
- Comment out unused tones - Create symbolic tone numbers rather than hardcoded
Diffstat (limited to 'src/systemcmds')
-rw-r--r--src/systemcmds/preflight_check/preflight_check.c6
-rw-r--r--src/systemcmds/tests/test_hrt.c4
2 files changed, 5 insertions, 5 deletions
diff --git a/src/systemcmds/preflight_check/preflight_check.c b/src/systemcmds/preflight_check/preflight_check.c
index 4c19dcffb..a323261cc 100644
--- a/src/systemcmds/preflight_check/preflight_check.c
+++ b/src/systemcmds/preflight_check/preflight_check.c
@@ -176,15 +176,15 @@ system_eval:
led_toggle(leds, LED_AMBER);
if (i % 10 == 0) {
- ioctl(buzzer, TONE_SET_ALARM, 4);
+ ioctl(buzzer, TONE_SET_ALARM, TONE_NOTIFY_NEUTRAL_TUNE);
} else if (i % 5 == 0) {
- ioctl(buzzer, TONE_SET_ALARM, 2);
+ ioctl(buzzer, TONE_SET_ALARM, TONE_ERROR_TUNE);
}
usleep(100000);
}
/* stop alarm */
- ioctl(buzzer, TONE_SET_ALARM, 0);
+ ioctl(buzzer, TONE_SET_ALARM, TONE_STOP_TUNE);
/* switch on leds */
led_on(leds, LED_BLUE);
diff --git a/src/systemcmds/tests/test_hrt.c b/src/systemcmds/tests/test_hrt.c
index f6e540401..ba6b86adb 100644
--- a/src/systemcmds/tests/test_hrt.c
+++ b/src/systemcmds/tests/test_hrt.c
@@ -137,7 +137,7 @@ int test_tone(int argc, char *argv[])
tone = atoi(argv[1]);
if (tone == 0) {
- result = ioctl(fd, TONE_SET_ALARM, 0);
+ result = ioctl(fd, TONE_SET_ALARM, TONE_STOP_TUNE);
if (result < 0) {
printf("failed clearing alarms\n");
@@ -148,7 +148,7 @@ int test_tone(int argc, char *argv[])
}
} else {
- result = ioctl(fd, TONE_SET_ALARM, 0);
+ result = ioctl(fd, TONE_SET_ALARM, TONE_STOP_TUNE);
if (result < 0) {
printf("failed clearing alarms\n");