|
|
|
@ -204,8 +204,7 @@ AP_GPS_SIRF::_accumulate(uint8_t val)
@@ -204,8 +204,7 @@ AP_GPS_SIRF::_accumulate(uint8_t val)
|
|
|
|
|
/*
|
|
|
|
|
detect a SIRF GPS |
|
|
|
|
*/ |
|
|
|
|
bool |
|
|
|
|
AP_GPS_SIRF::_detect(struct SIRF_detect_state &state, uint8_t data) |
|
|
|
|
bool AP_GPS_SIRF::_detect(struct SIRF_detect_state &state, uint8_t data) |
|
|
|
|
{ |
|
|
|
|
switch (state.step) { |
|
|
|
|
case 1: |
|
|
|
@ -232,8 +231,9 @@ AP_GPS_SIRF::_detect(struct SIRF_detect_state &state, uint8_t data)
@@ -232,8 +231,9 @@ AP_GPS_SIRF::_detect(struct SIRF_detect_state &state, uint8_t data)
|
|
|
|
|
break; |
|
|
|
|
case 4: |
|
|
|
|
state.checksum = (state.checksum + data) & 0x7fff; |
|
|
|
|
if (++state.payload_counter == state.payload_length) |
|
|
|
|
if (++state.payload_counter == state.payload_length) { |
|
|
|
|
state.step++; |
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
|
case 5: |
|
|
|
|
state.step++; |
|
|
|
|