Subversion Repositories FlightCtrl

Compare Revisions

Ignore whitespace Rev 2058 → Rev 2059

/branches/dongfang_FC_rewrite/heightControl.c
36,9 → 36,12
if (height > maxHeightThisFlight)
maxHeightThisFlight = height;
// debugOut.analog[25] = dynamicParams.heightSetting;
 
if (staticParams.bitConfig & CFG_SIMPLE_HC_HOLD_SWITCH) {
// If switch is activated in config, the MaxHeight parameter is a switch value: ON in both ends of the range; OFF in the middle.
if (dynamicParams.heightSetting < 40 || dynamicParams.heightSetting > 255 - 40) {
// if (dynamicParams.heightSetting < 40 || dynamicParams.heightSetting > 255 - 40) {
if (dynamicParams.heightSetting >= 255/3) {
// Switch is ON
if (setHeightLatch <= LATCH_TIME) {
if (setHeightLatch == LATCH_TIME) {
77,7 → 80,7
}
 
// height, in meters (so the division factor is: 100)
debugOut.analog[24] = (117100 - filteredAirPressure) / 100;
// debugOut.analog[24] = (117100 - filteredAirPressure) / 100;
// Calculated 0 alt number: 108205
// Experimental 0 alt number: 117100
}