Subversion Repositories NaviCtrl

Rev

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

Rev 500 Rev 501
Line 158... Line 158...
158
        if(CheckDelay(I2CBus(Compass_I2CPort)->Timeout))
158
        if(CheckDelay(I2CBus(Compass_I2CPort)->Timeout))
159
        {
159
        {
160
                LED_RED_ON;
160
                LED_RED_ON;
161
                sprintf(ErrorMSG,"no compass communica");
161
                sprintf(ErrorMSG,"no compass communica");
162
                //Reset Compass communication
162
                //Reset Compass communication
-
 
163
                if(Compass_I2CPort == NCMAG_PORT_EXTERN) I2CBus_Init(I2C0);     else I2CBus_Init(I2C1);
163
                Compass_Init();
164
                Compass_Init();
164
                newErrorCode = 4;
165
                newErrorCode = 4;
165
                StopNavigation = 1;
166
                StopNavigation = 1;
166
                UART_VersionInfo.HardwareError[0] |= NC_ERROR0_COMPASS_RX;
167
                UART_VersionInfo.HardwareError[0] |= NC_ERROR0_COMPASS_RX;
167
                DebugOut.StatusRed |= AMPEL_COMPASS;
168
                DebugOut.StatusRed |= AMPEL_COMPASS;
Line 171... Line 172...
171
                LED_RED_ON;
172
                LED_RED_ON;
172
                sprintf(ErrorMSG,"compass sensor error");
173
                sprintf(ErrorMSG,"compass sensor error");
173
                newErrorCode = 34;
174
                newErrorCode = 34;
174
                StopNavigation = 1;
175
                StopNavigation = 1;
175
                UART_VersionInfo.HardwareError[0] |= NC_ERROR0_COMPASS_VALUE;
176
                UART_VersionInfo.HardwareError[0] |= NC_ERROR0_COMPASS_VALUE;
-
 
177
                if(Compass_I2CPort == NCMAG_PORT_EXTERN) I2CBus_Init(I2C0);     else I2CBus_Init(I2C1);
176
                Compass_Init();
178
                Compass_Init();
177
        }
179
        }
178
        else if((FCCalibActive || CompassCalState) && FC_Version.Hardware)
180
        else if((FCCalibActive || CompassCalState) && FC_Version.Hardware)
179
        {
181
        {
180
                sprintf(ErrorMSG,"Calibrate... ");
182
                sprintf(ErrorMSG,"Calibrate... ");