Subversion Repositories FlightCtrl

Rev

Rev 1739 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1739 Rev 1749
Line 81... Line 81...
81
 
81
 
82
void LipoDetection(unsigned char print)
82
void LipoDetection(unsigned char print)
83
{
83
{
84
        #define MAX_CELL_VOLTAGE 43 // max cell volatage for LiPO
84
        #define MAX_CELL_VOLTAGE 43 // max cell volatage for LiPO
85
        unsigned int timer, cells;
85
        unsigned int timer, cells;
86
        if(print) printf("\n\rBatt:");
86
        if(print) printf("\n\rBat:");
87
        if(EE_Parameter.UnterspannungsWarnung < 50) // automatische Zellenerkennung
87
        if(EE_Parameter.UnterspannungsWarnung < 50) // automatische Zellenerkennung
88
        {
88
        {
89
                timer = SetDelay(500);
89
                timer = SetDelay(500);
90
                if(print) while (!CheckDelay(timer));
90
                if(print) while (!CheckDelay(timer));
Line 198... Line 198...
198
                        printf("\n\r\n\r!! MISSING BL-CTRL: %d !!",i+1);
198
                        printf("\n\r\n\r!! MISSING BL-CTRL: %d !!",i+1);
199
                        ServoActive = 2; // just in case the FC would be used as camera-stabilizer
199
                        ServoActive = 2; // just in case the FC would be used as camera-stabilizer
200
                }
200
                }
201
                Motor[i].State &= ~MOTOR_STATE_ERROR_MASK; // clear error counter
201
                Motor[i].State &= ~MOTOR_STATE_ERROR_MASK; // clear error counter
202
        }
202
        }
203
        printf("\n\r===================================");
203
        printf("\n\r=");///
Line 204... Line 204...
204
 
204
 
Line 205... Line 205...
205
    if(RequiredMotors < FoundMotors) VersionInfo.HardwareError[1] |= DEFEKT_MIXER_ERR;
205
    if(RequiredMotors < FoundMotors) VersionInfo.HardwareError[1] |= DEFEKT_MIXER_ERR;
206
 
206
 
Line 227... Line 227...
227
        if((FlugMinutenGesamt == 0xFFFF) || (FlugMinuten == 0xFFFF))
227
        if((FlugMinutenGesamt == 0xFFFF) || (FlugMinuten == 0xFFFF))
228
        {
228
        {
229
                FlugMinuten = 0;
229
                FlugMinuten = 0;
230
                FlugMinutenGesamt = 0;
230
                FlugMinutenGesamt = 0;
231
        }
231
        }
232
    printf("\n\rFlight-time %u min  Total:%u min", FlugMinuten, FlugMinutenGesamt);
232
    printf("\n\rFlight-time %u min  T:%u min", FlugMinuten, FlugMinutenGesamt);
Line 233... Line 233...
233
 
233
 
234
        printf("\n\rControl: ");
234
        printf("\n\rControl: ");
235
        if (EE_Parameter.GlobalConfig & CFG_HEADING_HOLD) printf("HeadingHold");
235
        if (EE_Parameter.GlobalConfig & CFG_HEADING_HOLD) printf("HeadingHold");
-
 
236
        else printf("Normal (ACC-Mode)");
Line -... Line 237...
-
 
237
#ifdef NODISPLAY                        //  main.h
236
        else printf("Normal (ACC-Mode)");
238
 
-
 
239
#warning : "### no MKTool Display ###"
237
 
240
    LcdClear();
238
    LcdClear();
241
        #endif
239
    I2CTimeout = 5000;
242
    I2CTimeout = 5000;
Line 240... Line 243...
240
    WinkelOut.Orientation = 1;
243
    WinkelOut.Orientation = 1;
Line 241... Line 244...
241
    LipoDetection(1);
244
    LipoDetection(1);
242
 
245
 
243
        LIBFC_ReceiverInit(EE_Parameter.Receiver);
246
        LIBFC_ReceiverInit(EE_Parameter.Receiver);
244
 
247
 
Line 245... Line 248...
245
        printf("\n\r===================================\n\r");
248
        printf("\n\r=\n\r");///