mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-03 11:38:56 +08:00
detect px4io conflicts, don't set sbus as default
This commit is contained in:
committed by
Silvan Fuhrer
parent
2ecc7226e6
commit
c0d1717897
@@ -97,6 +97,11 @@ int CrsfRc::task_spawn(int argc, char *argv[])
|
||||
return PX4_ERROR;
|
||||
}
|
||||
|
||||
if (board_rc_conflicting(device_name)) {
|
||||
PX4_INFO("unable to start, conflict with PX4IO on %s", device_name);
|
||||
return PX4_ERROR;
|
||||
}
|
||||
|
||||
CrsfRc *instance = new CrsfRc(device_name);
|
||||
|
||||
if (instance == nullptr) {
|
||||
|
||||
@@ -93,6 +93,11 @@ int DsmRc::task_spawn(int argc, char *argv[])
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (board_rc_conflicting(device_name)) {
|
||||
PX4_INFO("unable to start, conflict with PX4IO on %s", device_name);
|
||||
return PX4_ERROR;
|
||||
}
|
||||
|
||||
if (device_name && (access(device_name, R_OK | W_OK) == 0)) {
|
||||
DsmRc *instance = new DsmRc(device_name);
|
||||
|
||||
|
||||
@@ -88,6 +88,11 @@ int GhstRc::task_spawn(int argc, char *argv[])
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (board_rc_conflicting(device_name)) {
|
||||
PX4_INFO("unable to start, conflict with PX4IO on %s", device_name);
|
||||
return PX4_ERROR;
|
||||
}
|
||||
|
||||
if (device_name && (access(device_name, R_OK | W_OK) == 0)) {
|
||||
GhstRc *instance = new GhstRc(device_name);
|
||||
|
||||
|
||||
@@ -85,6 +85,11 @@ int SbusRc::task_spawn(int argc, char *argv[])
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (board_rc_conflicting(device_name)) {
|
||||
PX4_INFO("unable to start, conflict with PX4IO on %s", device_name);
|
||||
return PX4_ERROR;
|
||||
}
|
||||
|
||||
if (device_name && (access(device_name, R_OK | W_OK) == 0)) {
|
||||
SbusRc *instance = new SbusRc(device_name);
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ serial_config:
|
||||
port_config_param:
|
||||
name: RC_SBUS_PRT_CFG
|
||||
group: Serial
|
||||
default: RC
|
||||
#default: RC
|
||||
#depends_on_port: RC
|
||||
description_extended: |
|
||||
SBUS RC driver.
|
||||
|
||||
Reference in New Issue
Block a user