Subversion Repositories NaviCtrl

Rev

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

Rev 287 Rev 289
Line 382... Line 382...
382
                raw+= pRxBuffer[5];
382
                raw+= pRxBuffer[5];
383
                if(raw >= NCMAG_MIN_RAWVALUE && raw <= NCMAG_MAX_RAWVALUE) MagRawVector.Z = raw;
383
                if(raw >= NCMAG_MIN_RAWVALUE && raw <= NCMAG_MAX_RAWVALUE) MagRawVector.Z = raw;
384
        }
384
        }
385
        if(Compass_CalState || !NCMAG_IsCalibrated)
385
        if(Compass_CalState || !NCMAG_IsCalibrated)
386
        {       // mark out data invalid
386
        {       // mark out data invalid
387
                MagVector.X = 0;
387
                MagVector.X = MagRawVector.X;
388
                MagVector.Y = 0;
388
                MagVector.Y = MagRawVector.Y;
389
                MagVector.Z = 0;
389
                MagVector.Z = MagRawVector.Z;
390
                Compass_Heading = -1;
390
                Compass_Heading = -1;
391
        }
391
        }
392
        else
392
        else
393
        {
393
        {
394
                // update MagVector from MagRaw Vector by Scaling
394
                // update MagVector from MagRaw Vector by Scaling