Subversion Repositories FlightCtrl

Rev

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

Rev 2443 Rev 2452
Line 822... Line 822...
822
#endif
822
#endif
Line 823... Line 823...
823
 
823
 
824
#ifdef REDUNDANT_FC_SLAVE
824
#ifdef REDUNDANT_FC_SLAVE
825
  if(UebertragungAbgeschlossen || MotorenEin)
825
  if(UebertragungAbgeschlossen || MotorenEin)
826
  {
826
  {
827
    static unsigned char who;
827
    static unsigned char who, request;
-
 
828
    unsigned char SendRedundantMotor[MAX_MOTORS], i;
828
    unsigned char SendRedundantMotor[MAX_MOTORS], i;
829
    if(!request) { who = (who+1) % RequiredMotors; request = 1;} // nur in jedem 2. Zykus abfragen, weil die Antwort zu lang ist
829
    who = (who+1) % RequiredMotors;
830
        else request = 0;
830
    for(i=0; i<RequiredMotors; i++)
831
    for(i=0; i<RequiredMotors; i++)
-
 
832
     {
831
     {
833
          if(request) SendRedundantMotor[0] = who+1;
832
          SendRedundantMotor[0] = who+1;
834
          else SendRedundantMotor[0] = 0;
833
          if(PC_MotortestActive) SendRedundantMotor[0] |= 0x80;
835
          if(PC_MotortestActive) SendRedundantMotor[0] |= 0x80;
834
      SendRedundantMotor[i+1] = Motor[i].SetPoint;
836
      SendRedundantMotor[i+1] = Motor[i].SetPoint;
835
     }
837
     }
836
         SendOutData('!', FC_ADDRESS, 1, (unsigned char *) &SendRedundantMotor, RequiredMotors+1);
838
         SendOutData('!', FC_ADDRESS, 1, (unsigned char *) &SendRedundantMotor, RequiredMotors+1);