Subversion Repositories FlightCtrl

Rev

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

Rev 1975 Rev 1986
Line 287... Line 287...
287
 * Get other channel value
287
 * Get other channel value
288
 */
288
 */
289
int16_t RC_getVariable(uint8_t varNum) {
289
int16_t RC_getVariable(uint8_t varNum) {
290
  if (varNum < 4)
290
  if (varNum < 4)
291
    // 0th variable is 5th channel (1-based) etc.
291
    // 0th variable is 5th channel (1-based) etc.
292
    return RCChannel(varNum + 4) + POT_OFFSET;
292
    return RCChannel(varNum + CH_POTS) + POT_OFFSET;
293
  /*
293
  /*
294
   * Let's just say:
294
   * Let's just say:
295
   * The RC variable 4 is hardwired to channel 5
-
 
296
   * The RC variable 5 is hardwired to channel 6
295
   * The RC variable i is hardwired to channel i, i>=4
297
   * The RC variable 6 is hardwired to channel 7
-
 
298
   * The RC variable 7 is hardwired to channel 8
-
 
299
   * Alternatively, one could bind them to channel (4 + varNum) - or whatever...
-
 
300
   */
296
   */
301
  return PPM_in[varNum + 1] + POT_OFFSET;
297
  return PPM_in[varNum] + POT_OFFSET;
302
}
298
}
Line 303... Line 299...
303
 
299
 
304
uint8_t RC_getSignalQuality(void) {
300
uint8_t RC_getSignalQuality(void) {
305
  if (RC_Quality >= 160)
301
  if (RC_Quality >= 160)