Subversion Repositories FlightCtrl

Rev

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

Rev 2141 Rev 2142
Line 83... Line 83...
83
  // Control
83
  // Control
84
  staticParams.externalControl = 0;
84
  staticParams.externalControl = 0;
85
  staticParams.IFactor = 52;
85
  staticParams.IFactor = 52;
Line 86... Line 86...
86
 
86
 
87
  staticParams.airspeedCorrection = 1;
87
  staticParams.airspeedCorrection = 1;
Line 88... Line 88...
88
  staticParams.isFlyingThreshold = 100;
88
  staticParams.isFlyingThreshold = 10;
89
 
89
 
90
  // Servos
90
  // Servos
91
  staticParams.servoCount = 7;
91
  staticParams.servoCount = 6;
92
  staticParams.servos[CONTROL_ELEVATOR].reverse = 0;
92
  staticParams.servos[CONTROL_ELEVATOR].reverse = 0;
Line -... Line 93...
-
 
93
  staticParams.servos[CONTROL_AILERONS].reverse = 0; // 1 for extra.
-
 
94
  staticParams.servos[CONTROL_RUDDER].reverse = 0;
-
 
95
 
-
 
96
  for (uint8_t i=0; i<4; i++) {
-
 
97
      staticParams.servos[i].minValue = 80;
93
  staticParams.servos[CONTROL_AILERONS].reverse = 1;
98
      staticParams.servos[i].maxValue = 80;
94
  staticParams.servos[CONTROL_RUDDER].reverse = 0;
99
  }
Line 95... Line 100...
95
 
100
 
96
  // Battery warning and emergency flight
101
  // Battery warning and emergency flight
97
  staticParams.batteryWarningVoltage = 101;  // 3.7 each for 3S
102
  staticParams.batteryWarningVoltage = 101;  // 3.7 each for 3S
98
 
103
 
99
  for (uint8_t i=0; i<3; i++) {
104
  for (uint8_t i=0; i<3; i++) {
100
          staticParams.gyroPID[i].P = 40;
105
          staticParams.gyroPID[i].P = 40;
Line 101... Line 106...
101
          staticParams.gyroPID[i].I = 40;
106
          staticParams.gyroPID[i].I = 20;
102
          staticParams.gyroPID[i].D = 40;
107
          staticParams.gyroPID[i].D = 20;
103
          staticParams.gyroPID[i].iMax = 60;
108
          staticParams.gyroPID[i].iMax = 30; // 60 for extra.
Line 111... Line 116...
111
  staticParams.outputFlash[0].bitmask = 1; //0b01011111;
116
  staticParams.outputFlash[0].bitmask = 1; //0b01011111;
112
  staticParams.outputFlash[0].timing = 15;
117
  staticParams.outputFlash[0].timing = 15;
113
  staticParams.outputFlash[1].bitmask = 3; //0b11110011;
118
  staticParams.outputFlash[1].bitmask = 3; //0b11110011;
114
  staticParams.outputFlash[1].timing = 15;
119
  staticParams.outputFlash[1].timing = 15;
Line 115... Line 120...
115
 
120
 
116
  staticParams.outputDebugMask = 8;
121
  staticParams.outputDebugMask = 0;
117
  staticParams.outputFlags   = OUTPUTFLAGS_FLASH_0_AT_BEEP | OUTPUTFLAGS_FLASH_1_AT_BEEP | OUTPUTFLAGS_USE_ONBOARD_LEDS;
122
  staticParams.outputFlags   = OUTPUTFLAGS_FLASH_0_AT_BEEP | OUTPUTFLAGS_FLASH_1_AT_BEEP | OUTPUTFLAGS_USE_ONBOARD_LEDS;
Line 118... Line 123...
118
}
123
}
119
 
124
 
Line 137... Line 142...
137
  IMUConfig.gyroPIDFilterConstant = 10;
142
  IMUConfig.gyroPIDFilterConstant = 10;
138
  IMUConfig.gyroDFilterConstant = 1;
143
  IMUConfig.gyroDFilterConstant = 1;
139
  IMUConfig.rateTolerance = 120;
144
  IMUConfig.rateTolerance = 120;
140
  IMUConfig.gyroDWindowLength = 8;
145
  IMUConfig.gyroDWindowLength = 8;
141
  IMUConfig.gyroQuadrant = 4;
146
  IMUConfig.gyroQuadrant = 4;
142
  IMUConfig.imuReversedFlags = IMU_REVERSE_GYRO_PR;
147
  IMUConfig.imuReversedFlags = 0;
143
}
148
}
Line 144... Line 149...
144
 
149
 
145
/***************************************************/
150
/***************************************************/
146
/*    Default Values for R/C Channels              */
151
/*    Default Values for R/C Channels              */