forked from Archive/PX4-Autopilot
tone_alarm: more device paths replaced with #define
This commit is contained in:
parent
03727974f1
commit
1a641b791d
|
@ -82,7 +82,7 @@ static int buzzer;
|
|||
|
||||
int buzzer_init()
|
||||
{
|
||||
buzzer = open("/dev/tone_alarm", O_WRONLY);
|
||||
buzzer = open(TONEALARM_DEVICE_PATH, O_WRONLY);
|
||||
|
||||
if (buzzer < 0) {
|
||||
warnx("Buzzer: open fail\n");
|
||||
|
|
|
@ -163,7 +163,7 @@ system_eval:
|
|||
warnx("PREFLIGHT CHECK ERROR! TRIGGERING ALARM");
|
||||
fflush(stderr);
|
||||
|
||||
int buzzer = open("/dev/tone_alarm", O_WRONLY);
|
||||
int buzzer = open(TONEALARM_DEVICE_PATH, O_WRONLY);
|
||||
int leds = open(LED_DEVICE_PATH, 0);
|
||||
|
||||
if (leds < 0) {
|
||||
|
|
|
@ -124,10 +124,10 @@ int test_tone(int argc, char *argv[])
|
|||
int fd, result;
|
||||
unsigned long tone;
|
||||
|
||||
fd = open("/dev/tone_alarm", O_WRONLY);
|
||||
fd = open(TONEALARM_DEVICE_PATH, O_WRONLY);
|
||||
|
||||
if (fd < 0) {
|
||||
printf("failed opening /dev/tone_alarm\n");
|
||||
printf("failed opening " TONEALARM_DEVICE_PATH "\n");
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue