Subversion Repositories NaviCtrl

Rev

Rev 146 | Rev 150 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 146 Rev 149
Line 133... Line 133...
133
        }
133
        }
134
        else if(CheckDelay(I2C1_Timeout))
134
        else if(CheckDelay(I2C1_Timeout))
135
        {
135
        {
136
                LED_RED_ON;
136
                LED_RED_ON;
137
                sprintf(ErrorMSG,"no MK3Mag communication ");
137
                sprintf(ErrorMSG,"no MK3Mag communication ");
-
 
138
                //Reset I2CBus
-
 
139
                I2C1_Deinit();
-
 
140
                I2C1_Init();
138
                ErrorCode = 4;
141
                ErrorCode = 4;
139
                StopNavigation = 1;
142
                StopNavigation = 1;
140
        }
143
        }
141
        else if(FC_Version.Compatible != FC_SPI_COMPATIBLE)
144
        else if(FC_Version.Compatible != FC_SPI_COMPATIBLE)
142
        {
145
        {
Line 259... Line 262...
259
                USB_ProcessRxData();    // process request
262
                USB_ProcessRxData();    // process request
260
                USB_TransmitTxData();   // send answer
263
                USB_TransmitTxData();   // send answer
Line 261... Line 264...
261
 
264
 
Line 262... Line 265...
262
                SPI0_UpdateBuffer();    // handle new SPI Data
265
                SPI0_UpdateBuffer();    // handle new SPI Data
Line 263... Line 266...
263
 
266
 
264
                //I2C1_UpdateCompass(); moved to Timer1 ISR
267
                //I2C1_UpdateCompass(); moved to Timer1 ISR to avoid timing problems
265
 
268
 
266
                // ---------------- Error Check Timing ----------------------------
269
                // ---------------- Error Check Timing ----------------------------