diff --git a/libraries/AP_GPS/AP_GPS_MTK19.cpp b/libraries/AP_GPS/AP_GPS_MTK19.cpp index 842e9fb6ab..356906574f 100644 --- a/libraries/AP_GPS/AP_GPS_MTK19.cpp +++ b/libraries/AP_GPS/AP_GPS_MTK19.cpp @@ -11,24 +11,20 @@ // GPS configuration : Custom protocol per "DIYDrones Custom Binary Sentence Specification V1.6, v1.7, v1.8, v1.9" // -#include +#include #include "AP_GPS_MTK19.h" #include -#if defined(ARDUINO) && ARDUINO >= 100 - #include "Arduino.h" -#else - #include -#endif // Constructors //////////////////////////////////////////////////////////////// -AP_GPS_MTK19::AP_GPS_MTK19(Stream *s) : GPS(s) +AP_GPS_MTK19::AP_GPS_MTK19() : GPS() { } // Public Methods ////////////////////////////////////////////////////////////// void -AP_GPS_MTK19::init(enum GPS_Engine_Setting nav_setting) +AP_GPS_MTK19::init(AP_HAL::UARTDriver *s, enum GPS_Engine_Setting nav_setting) { + _port = s; _port->flush(); // initialize serial port for binary protocol use diff --git a/libraries/AP_GPS/AP_GPS_MTK19.h b/libraries/AP_GPS/AP_GPS_MTK19.h index 0d6fdd1c44..61e080075c 100644 --- a/libraries/AP_GPS/AP_GPS_MTK19.h +++ b/libraries/AP_GPS/AP_GPS_MTK19.h @@ -22,8 +22,8 @@ class AP_GPS_MTK19 : public GPS { public: - AP_GPS_MTK19(Stream *s); - virtual void init(enum GPS_Engine_Setting nav_setting = GPS_ENGINE_NONE); + AP_GPS_MTK19(); + virtual void init(AP_HAL::UARTDriver *s, enum GPS_Engine_Setting nav_setting = GPS_ENGINE_NONE); virtual bool read(void); static bool _detect(uint8_t );