mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 21:03:34 +08:00
System cmds: Move to 0 based index
This commit is contained in:
@@ -58,7 +58,7 @@
|
||||
|
||||
int test_adc(int argc, char *argv[])
|
||||
{
|
||||
int fd = open(ADC_DEVICE_PATH, O_RDONLY);
|
||||
int fd = open(ADC0_DEVICE_PATH, O_RDONLY);
|
||||
|
||||
if (fd < 0) {
|
||||
warnx("ERROR: can't open ADC device");
|
||||
|
||||
@@ -124,10 +124,10 @@ int test_tone(int argc, char *argv[])
|
||||
int fd, result;
|
||||
unsigned long tone;
|
||||
|
||||
fd = open(TONEALARM_DEVICE_PATH, O_WRONLY);
|
||||
fd = open(TONEALARM0_DEVICE_PATH, O_WRONLY);
|
||||
|
||||
if (fd < 0) {
|
||||
printf("failed opening " TONEALARM_DEVICE_PATH "\n");
|
||||
printf("failed opening " TONEALARM0_DEVICE_PATH "\n");
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
|
||||
int test_jig_voltages(int argc, char *argv[])
|
||||
{
|
||||
int fd = open(ADC_DEVICE_PATH, O_RDONLY);
|
||||
int fd = open(ADC0_DEVICE_PATH, O_RDONLY);
|
||||
int ret = OK;
|
||||
|
||||
if (fd < 0) {
|
||||
|
||||
@@ -91,7 +91,7 @@ int test_led(int argc, char *argv[])
|
||||
int fd;
|
||||
int ret = 0;
|
||||
|
||||
fd = open(LED_DEVICE_PATH, 0);
|
||||
fd = open(LED0_DEVICE_PATH, 0);
|
||||
|
||||
if (fd < 0) {
|
||||
printf("\tLED: open fail\n");
|
||||
|
||||
@@ -67,7 +67,7 @@ int test_ppm_loopback(int argc, char *argv[])
|
||||
int servo_fd, result;
|
||||
servo_position_t pos;
|
||||
|
||||
servo_fd = open(PWM_OUTPUT_DEVICE_PATH, O_RDWR);
|
||||
servo_fd = open(PWM_OUTPUT0_DEVICE_PATH, O_RDWR);
|
||||
|
||||
if (servo_fd < 0) {
|
||||
printf("failed opening /dev/pwm_servo\n");
|
||||
|
||||
@@ -63,7 +63,7 @@ int test_servo(int argc, char *argv[])
|
||||
servo_position_t data[PWM_OUTPUT_MAX_CHANNELS];
|
||||
servo_position_t pos;
|
||||
|
||||
fd = open(PWM_OUTPUT_DEVICE_PATH, O_RDWR);
|
||||
fd = open(PWM_OUTPUT0_DEVICE_PATH, O_RDWR);
|
||||
|
||||
if (fd < 0) {
|
||||
printf("failed opening /dev/pwm_servo\n");
|
||||
|
||||
Reference in New Issue
Block a user