Browse Source

Hotfix: Close fd before reusing it again

sbg
Lorenz Meier 11 years ago
parent
commit
4c13c67504
  1. 2
      src/modules/commander/state_machine_helper.cpp

2
src/modules/commander/state_machine_helper.cpp

@ -666,6 +666,8 @@ int prearm_check(const struct vehicle_status_s *status, const int mavlink_fd) @@ -666,6 +666,8 @@ int prearm_check(const struct vehicle_status_s *status, const int mavlink_fd)
}
if (!status->is_rotary_wing) {
/* accel done, close it */
close(fd);
fd = open(AIRSPEED_DEVICE_PATH, O_RDONLY);
if (fd < 0) {

Loading…
Cancel
Save