diff --git a/libraries/AP_HAL_Linux/UARTDriver.h b/libraries/AP_HAL_Linux/UARTDriver.h index 3b26c4057a..0339712184 100644 --- a/libraries/AP_HAL_Linux/UARTDriver.h +++ b/libraries/AP_HAL_Linux/UARTDriver.h @@ -1,7 +1,8 @@ #pragma once -#include "AP_HAL_Linux.h" +#include +#include "AP_HAL_Linux.h" #include "SerialDevice.h" class Linux::UARTDriver : public AP_HAL::UARTDriver { @@ -38,7 +39,7 @@ public: enum flow_control get_flow_control(void) { return _flow_control; } private: - SerialDevice *_device = nullptr; + AP_HAL::OwnPtr _device; bool _nonblocking_writes; bool _console; volatile bool _in_timer;