detect px4io conflicts, don't set sbus as default

This commit is contained in:
Alexander Lerach
2025-07-30 15:09:39 +02:00
committed by Silvan Fuhrer
parent 2ecc7226e6
commit c0d1717897
6 changed files with 53 additions and 2 deletions
+5
View File
@@ -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) {
+5
View File
@@ -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);
+5
View File
@@ -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);
+5
View File
@@ -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);
+1 -1
View File
@@ -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.