diff --git a/libraries/SITL/SIM_GPS.cpp b/libraries/SITL/SIM_GPS.cpp index 933211a868..c98ea4b4a5 100644 --- a/libraries/SITL/SIM_GPS.cpp +++ b/libraries/SITL/SIM_GPS.cpp @@ -19,6 +19,7 @@ #if HAL_SIM_GPS_EXTERNAL_FIFO_ENABLED #include #include +#include #include extern const HAL_SITL& hal_sitl; #endif @@ -45,7 +46,9 @@ GPS::GPS(uint8_t _instance) : AP_BoardConfig::allocation_error("gps_fifo filepath"); } if (mkfifo(_gps_fifo, 0666) < 0) { - printf("MKFIFO failed with %m\n"); + if (errno != EEXIST) { + printf("MKFIFO failed with %m\n"); + } } #endif } diff --git a/libraries/SITL/SIM_GPS.h b/libraries/SITL/SIM_GPS.h index 8a29df57d6..d495d12355 100644 --- a/libraries/SITL/SIM_GPS.h +++ b/libraries/SITL/SIM_GPS.h @@ -42,6 +42,8 @@ namespace SITL { class GPS : public SerialDevice { public: + CLASS_NO_COPY(GPS); + enum Type { NONE = 0, UBLOX = 1,