Subversion Repositories FlightCtrl

Compare Revisions

Ignore whitespace Rev 1954 → Rev 1955

/branches/dongfang_FC_rewrite/heightControl.c
99,7 → 99,7
}
 
// height, in meters (so the division factor is: 100)
DebugOut.Analog[30] = height / 10;
debugOut.analog[30] = height / 10;
}
 
// ParamSet.GlobalConfig & CFG_HEIGHT_CONTROL
124,11 → 124,11
// iHeight += heightError;
 
if (dHeight > 0) {
DebugOut.Digital[0] |= DEBUG_HEIGHT_DIFF;
DebugOut.Digital[1] &= ~DEBUG_HEIGHT_DIFF;
debugOut.digital[0] |= DEBUG_HEIGHT_DIFF;
debugOut.digital[1] &= ~DEBUG_HEIGHT_DIFF;
} else if (dHeight < 0) {
DebugOut.Digital[1] |= DEBUG_HEIGHT_DIFF;
DebugOut.Digital[0] &= ~DEBUG_HEIGHT_DIFF;
debugOut.digital[1] |= DEBUG_HEIGHT_DIFF;
debugOut.digital[0] &= ~DEBUG_HEIGHT_DIFF;
}
 
/*
167,13 → 167,13
if (isFlying >= 1000 && stronglyFilteredHeightDiff < 3
&& stronglyFilteredHeightDiff > -3) {
hoverThrottle = stronglyFilteredThrottle;
DebugOut.Digital[0] |= DEBUG_HOVERTHROTTLE;
debugOut.digital[0] |= DEBUG_HOVERTHROTTLE;
// DebugOut.Analog[18] = hoverThrottle;
} else
DebugOut.Digital[0] &= ~DEBUG_HOVERTHROTTLE;
debugOut.digital[0] &= ~DEBUG_HOVERTHROTTLE;
 
DebugOut.Analog[20] = dThrottle;
DebugOut.Analog[21] = hoverThrottle;
debugOut.analog[20] = dThrottle;
debugOut.analog[21] = hoverThrottle;
 
return throttle;
}