Subversion Repositories NaviCtrl

Rev

Rev 264 | Rev 281 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 264 Rev 270
Line 374... Line 374...
374
                case UBXSTATE_LEN2: // 2nd message length byte
374
                case UBXSTATE_LEN2: // 2nd message length byte
375
                        RxHdr.Length += ((u16)c)<<8; // high byte last
375
                        RxHdr.Length += ((u16)c)<<8; // high byte last
376
                        if (RxHdr.Length >= UBX_MSG_DATA_SIZE)
376
                        if (RxHdr.Length >= UBX_MSG_DATA_SIZE)
377
                        {
377
                        {
378
                                ubxState = UBXSTATE_IDLE;
378
                                ubxState = UBXSTATE_IDLE;
379
                                DebugOut.Analog[25]++;
-
 
380
                        }
379
                        }
381
                        else
380
                        else
382
                        {
381
                        {
383
                                cka += c;
382
                                cka += c;
384
                                ckb += cka;
383
                                ckb += cka;
Line 396... Line 395...
396
                                if (RxBytes >= RxHdr.Length) ubxState = UBXSTATE_CKA; // switch to next state if all data have been received
395
                                if (RxBytes >= RxHdr.Length) ubxState = UBXSTATE_CKA; // switch to next state if all data have been received
397
                        }
396
                        }
398
                        else // rx buffer overrun
397
                        else // rx buffer overrun
399
                        {
398
                        {
400
                                ubxState = UBXSTATE_IDLE;
399
                                ubxState = UBXSTATE_IDLE;
401
                                DebugOut.Analog[25]++;
-
 
402
                        }
400
                        }
403
                        break;
401
                        break;
Line 404... Line 402...
404
 
402
 
405
                case UBXSTATE_CKA:
403
                case UBXSTATE_CKA:
406
                        if (c == cka) ubxState = UBXSTATE_CKB;
404
                        if (c == cka) ubxState = UBXSTATE_CKB;
407
                        else
405
                        else
408
                        {
406
                        {
409
                                ubxState = UBXSTATE_IDLE;
-
 
410
                                DebugOut.Analog[24]++;
407
                                ubxState = UBXSTATE_IDLE;
411
                        }
408
                        }
Line 412... Line 409...
412
                        break;
409
                        break;
413
 
410
 
Line 460... Line 457...
460
                                                        UbxMsg.Status = NEWDATA;
457
                                                        UbxMsg.Status = NEWDATA;
461
                                                }      
458
                                                }      
462
                                        } // EOF filter matches
459
                                        } // EOF filter matches
463
                                } // EOF != INVALID
460
                                } // EOF != INVALID
464
                        }// EOF crc ok
461
                        }// EOF crc ok
465
                        else DebugOut.Analog[24]++;
-
 
466
                        ubxState = UBXSTATE_IDLE; // ready to parse new data
462
                        ubxState = UBXSTATE_IDLE; // ready to parse new data
467
                        break;
463
                        break;
Line 468... Line 464...
468
 
464
 
469
                default: // unknown ubx state
465
                default: // unknown ubx state