aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2014-03-16 18:50:20 +0100
committerLorenz Meier <lm@inf.ethz.ch>2014-03-16 18:50:20 +0100
commit6db2191a71ed0ea38e1fd18886371f099c14d593 (patch)
tree27c7df7150407cbaa5b7d04d196753a5cad8d982
parentc52969639f22f6aa3133377269c45bc02c25749a (diff)
downloadpx4-firmware-6db2191a71ed0ea38e1fd18886371f099c14d593.tar.gz
px4-firmware-6db2191a71ed0ea38e1fd18886371f099c14d593.tar.bz2
px4-firmware-6db2191a71ed0ea38e1fd18886371f099c14d593.zip
commander: Skip devices we do not want to touch in HIL
-rw-r--r--src/modules/commander/state_machine_helper.cpp19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/modules/commander/state_machine_helper.cpp b/src/modules/commander/state_machine_helper.cpp
index 1e892ed77..9178bcc5a 100644
--- a/src/modules/commander/state_machine_helper.cpp
+++ b/src/modules/commander/state_machine_helper.cpp
@@ -351,6 +351,23 @@ int hil_state_transition(hil_state_t new_state, int status_pub, struct vehicle_s
return 1;
}
+ /* skip serial ports */
+ if (!strncmp("tty", direntry-d_name, 3)) {
+ continue;
+ }
+ /* skip mtd devices */
+ if (!strncmp("mtd", direntry-d_name, 3)) {
+ continue;
+ }
+ /* skip ram devices */
+ if (!strncmp("ram", direntry-d_name, 3)) {
+ continue;
+ }
+ /* skip mavlink */
+ if (!strcmp("mavlink", direntry-d_name)) {
+ continue;
+ }
+
int block_ret = ::ioctl(sensfd, DEVIOCSPUBBLOCK, 1);
close(sensfd);
@@ -359,8 +376,6 @@ int hil_state_transition(hil_state_t new_state, int status_pub, struct vehicle_s
closedir(d);
- warnx("directory listing ok (FS mounted and readable)");
-
} else {
/* failed opening dir */
warnx("FAILED LISTING DEVICE ROOT DIRECTORY");