From 67ed5b73ef3102e039723098c7e0421513437512 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 5 Apr 2014 07:33:34 +1100 Subject: [PATCH] AP_GPS: added lock_port() interface used by SERIAL_CONTROL message --- libraries/AP_GPS/AP_GPS.cpp | 23 +++++++++++++++++++++++ libraries/AP_GPS/AP_GPS.h | 6 ++++++ 2 files changed, 29 insertions(+) diff --git a/libraries/AP_GPS/AP_GPS.cpp b/libraries/AP_GPS/AP_GPS.cpp index 28c0c4aa56..28a223122a 100644 --- a/libraries/AP_GPS/AP_GPS.cpp +++ b/libraries/AP_GPS/AP_GPS.cpp @@ -207,6 +207,11 @@ AP_GPS::update_instance(uint8_t instance) state[instance].status = NO_GPS; return; } + if (locked_ports & (1U<= GPS_MAX_INSTANCES) { + return; + } + if (lock) { + locked_ports |= (1U<