Subversion Repositories FlightCtrl

Rev

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

Rev 2102 Rev 2103
Line 102... Line 102...
102
  RED_OFF;
102
  RED_OFF;
103
  GRN_OFF;
103
  GRN_OFF;
104
}
104
}
Line 105... Line 105...
105
 
105
 
106
void configuration_setFlightParameters(uint8_t newFlightMode) {
106
void configuration_setFlightParameters(uint8_t newFlightMode) {
107
        updateFlightParametersToFlightMode(currentFlightMode = newFlightMode);
107
        flight_updateFlightParametersToFlightMode(currentFlightMode = newFlightMode);
Line 108... Line 108...
108
}
108
}
109
 
109
 
110
// Called after a change in configuration parameters, as a hook for modules to take over changes.
110
// Called after a change in configuration parameters, as a hook for modules to take over changes.
Line 134... Line 134...
134
  // Battery warning and emergency flight
134
  // Battery warning and emergency flight
135
  staticParams.batteryVoltageWarning = 101;  // 3.7 each for 3S
135
  staticParams.batteryVoltageWarning = 101;  // 3.7 each for 3S
136
  staticParams.emergencyThrottle = 35;
136
  staticParams.emergencyThrottle = 35;
137
  staticParams.emergencyFlightDuration = 30;
137
  staticParams.emergencyFlightDuration = 30;
Line -... Line 138...
-
 
138
 
-
 
139
  staticParams.stickIElevator = 80;
-
 
140
  staticParams.stickIAilerons = 120;
-
 
141
  staticParams.stickIRudder = 40;
138
 
142
 
139
  // Outputs
143
  // Outputs
140
  staticParams.outputFlash[0].bitmask = 1; //0b01011111;
144
  staticParams.outputFlash[0].bitmask = 1; //0b01011111;
141
  staticParams.outputFlash[0].timing = 15;
145
  staticParams.outputFlash[0].timing = 15;
142
  staticParams.outputFlash[1].bitmask = 3; //0b11110011;
146
  staticParams.outputFlash[1].bitmask = 3; //0b11110011;
Line 163... Line 167...
163
}
167
}
Line 164... Line 168...
164
 
168
 
165
void IMUConfig_default(void) {
169
void IMUConfig_default(void) {
166
  IMUConfig.gyroPIDFilterConstant = 1;
170
  IMUConfig.gyroPIDFilterConstant = 1;
167
  IMUConfig.gyroDFilterConstant = 1;
-
 
168
  IMUConfig.accFilterConstant = 10;
171
  IMUConfig.gyroDFilterConstant = 1;
-
 
172
  IMUConfig.rateTolerance = 120;
-
 
173
  IMUConfig.gyroDWindowLength = 3;
-
 
174
  IMUConfig.gyroQuadrant = 0;
169
  IMUConfig.rateTolerance = 120;
175
  IMUConfig.imuReversedFlags = 0;
170
  gyro_setDefaultParameters();
176
  gyro_setDefaultParameters();
Line 171... Line 177...
171
}
177
}
172
 
178