Subversion Repositories FlightCtrl

Rev

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

Rev 2067 Rev 2073
Line 69... Line 69...
69
    if (variables[i] < targetvalue && variables[i] < 255)
69
    if (variables[i] < targetvalue && variables[i] < 255)
70
      variables[i]++;
70
      variables[i]++;
71
    else if (variables[i] > 0 && variables[i] > targetvalue)
71
    else if (variables[i] > 0 && variables[i] > targetvalue)
72
      variables[i]--;
72
      variables[i]--;
73
  }
73
  }
74
 
-
 
75
  debugOut.analog[31] = variables[0];
-
 
76
}
74
}
Line 77... Line 75...
77
 
75
 
78
uint8_t controlMixer_getSignalQuality(void) {
76
uint8_t controlMixer_getSignalQuality(void) {
79
  uint8_t rcQ = RC_getSignalQuality();
77
  uint8_t rcQ = RC_getSignalQuality();
Line 119... Line 117...
119
  int16_t tempPRTY[4] = { 0, 0, 0, 0 };
117
  int16_t tempPRTY[4] = { 0, 0, 0, 0 };
Line 120... Line 118...
120
 
118
 
121
  // Decode commands.
119
  // Decode commands.
122
  uint8_t rcCommand = (RC_getSignalQuality() >= SIGNAL_OK) ? RC_getCommand()
120
  uint8_t rcCommand = (RC_getSignalQuality() >= SIGNAL_OK) ? RC_getCommand()
-
 
121
    : COMMAND_NONE;
-
 
122
 
-
 
123
  debugOut.analog[31] = rcCommand;
123
    : COMMAND_NONE;
124
 
124
  uint8_t ecCommand = (EC_getSignalQuality() >= SIGNAL_OK) ? EC_getCommand()
125
  uint8_t ecCommand = (EC_getSignalQuality() >= SIGNAL_OK) ? EC_getCommand()
Line 125... Line 126...
125
    : COMMAND_NONE;
126
    : COMMAND_NONE;
126
 
127
 
Line 182... Line 183...
182
  controls[CONTROL_THROTTLE] = tempPRTY[CONTROL_THROTTLE];
183
  controls[CONTROL_THROTTLE] = tempPRTY[CONTROL_THROTTLE];
183
  updateControlAndMeasureControlActivity(CONTROL_PITCH, tempPRTY[CONTROL_PITCH]);
184
  updateControlAndMeasureControlActivity(CONTROL_PITCH, tempPRTY[CONTROL_PITCH]);
184
  updateControlAndMeasureControlActivity(CONTROL_ROLL, tempPRTY[CONTROL_ROLL]);
185
  updateControlAndMeasureControlActivity(CONTROL_ROLL, tempPRTY[CONTROL_ROLL]);
185
  updateControlAndMeasureControlActivity(CONTROL_YAW, tempPRTY[CONTROL_YAW]);
186
  updateControlAndMeasureControlActivity(CONTROL_YAW, tempPRTY[CONTROL_YAW]);
186
  dampenControlActivity();
187
  dampenControlActivity();
187
  //debugOut.analog[17] = controlActivity/10;
-
 
Line 188... Line 188...
188
 
188
 
189
  // We can safely do this even with a bad signal - the variables will not have been updated then.
189
  // We can safely do this even with a bad signal - the variables will not have been updated then.
Line 190... Line 190...
190
  configuration_applyVariablesToParams();
190
  configuration_applyVariablesToParams();