diff --git a/libraries/AP_GPS/AP_GPS_SIRF.cpp b/libraries/AP_GPS/AP_GPS_SIRF.cpp index 641ff9477f..d11aab44b8 100644 --- a/libraries/AP_GPS/AP_GPS_SIRF.cpp +++ b/libraries/AP_GPS/AP_GPS_SIRF.cpp @@ -204,8 +204,8 @@ AP_GPS_SIRF::_accumulate(uint8_t val) bool AP_GPS_SIRF::_detect(uint8_t data) { - uint16_t checksum; - uint8_t step, payload_length, payload_counter; + static uint16_t checksum; + static uint8_t step, payload_length, payload_counter; switch (step) { case 1: