Subversion Repositories FlightCtrl

Rev

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

Rev 1529 Rev 1591
Line 233... Line 233...
233
    printf("\n\rMixer-Config: '%s' (%u Motors)",Mixer.Name,RequiredMotors);
233
    printf("\n\rMixer-Config: '%s' (%u Motors)",Mixer.Name,RequiredMotors);
Line 234... Line 234...
234
 
234
 
235
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
235
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
236
// + Check connected BL-Ctrls
236
// + Check connected BL-Ctrls
237
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
 
238
        printf("\n\rFound BL-Ctrl: ");
237
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
 
238
    motorread = 0;   UpdateMotor = 0;   SendMotorData(); while(!UpdateMotor); motorread = 0;  // read the first I2C-Data
239
    motorread = 0;   UpdateMotor = 0;   SendMotorData(); while(!UpdateMotor); motorread = 0;  // read the first I2C-Data
239
        printf("\n\rFound BL-Ctrl: ");
Line 240... Line 240...
240
    timer = SetDelay(2000);
240
    timer = SetDelay(4000);
241
 
241
 
242
        for(i=0; i < MAX_MOTORS; i++)
242
        for(i=0; i < MAX_MOTORS; i++)
243
         {
243
         {
244
          UpdateMotor = 0;
244
          UpdateMotor = 0;
245
      SendMotorData();
245
      SendMotorData();
246
          while(!UpdateMotor);
246
          while(!UpdateMotor);
247
      if(Mixer.Motor[i][0] > 0) // wait max 2 sec for the BL-Ctrls to wake up
247
      if(Mixer.Motor[i][0] > 0) // wait max 4 sec for the BL-Ctrls to wake up
248
        {
248
        {
249
             while(!CheckDelay(timer) && !(Motor[i].State & MOTOR_STATE_PRESENT_MASK) ) {UpdateMotor = 0; SendMotorData(); while(!UpdateMotor);};
249
             while(!CheckDelay(timer) && !(Motor[i].State & MOTOR_STATE_PRESENT_MASK) ) {UpdateMotor = 0; SendMotorData(); while(!UpdateMotor);};
250
                }
250
                }