@@ -149,10 +149,11 @@ bool adjustMulticopterAltitudeFromRCInput(void)
149149 // Calculate max up or min down limit value scaled for deadband
150150 // CR139
151151 // int16_t limitValue = rcThrottleAdjustment > 0 ? getMaxThrottle() : getThrottleIdleValue();
152- int16_t limitValue = rcThrottleAdjustment > 0 ? PWM_RANGE_MAX : PWM_RANGE_MIN ;
153- limitValue = applyDeadbandRescaled (limitValue - altHoldThrottleRCZero , rcControlsConfig ()-> alt_hold_deadband , -500 , 500 );
152+ // int16_t limitValue = rcThrottleAdjustment > 0 ? PWM_RANGE_MAX : PWM_RANGE_MIN;
153+ // limitValue = applyDeadbandRescaled(limitValue - altHoldThrottleRCZero, rcControlsConfig()->alt_hold_deadband, -500, 500);
154154 // CR139
155- int16_t rcClimbRate = ABS (rcThrottleAdjustment ) * navConfig ()-> mc .max_manual_climb_rate / limitValue ;
155+ // int16_t rcClimbRate = ABS(rcThrottleAdjustment) * navConfig()->mc.max_manual_climb_rate / limitValue;
156+ int16_t rcClimbRate = rcThrottleAdjustment * navConfig ()-> mc .max_manual_climb_rate / 500 ;
156157
157158 // DEBUG_SET(DEBUG_ALWAYS, 4, rcThrottleAdjustment);
158159 // DEBUG_SET(DEBUG_ALWAYS, 5, rcClimbRate);
@@ -595,24 +596,24 @@ static void checkForToiletBowling(void)
595596 startTime = 0 ;
596597 }
597598
598- DEBUG_SET (DEBUG_ALWAYS , 0 , courseError );
599- DEBUG_SET (DEBUG_ALWAYS , 2 , posControl .actualState .velXY * distanceToHoldPoint );
599+ // DEBUG_SET(DEBUG_ALWAYS, 0, courseError);
600+ // DEBUG_SET(DEBUG_ALWAYS, 2, posControl.actualState.velXY * distanceToHoldPoint);
600601}
601602// CR141
602603static void updatePositionAccelController_MC (timeDelta_t deltaMicros , float maxAccelLimit ) // , const float maxSpeed) CR47
603604{
604605 // CR141
605- DEBUG_SET (DEBUG_ALWAYS , 1 , calculateDistanceToDestination (& posControl .desiredState .pos ));
606- DEBUG_SET (DEBUG_ALWAYS , 3 , mcToiletBowlingHeadingCorrection );
607- DEBUG_SET (DEBUG_ALWAYS , 5 , posControl .actualState .velXY );
608- DEBUG_SET (DEBUG_ALWAYS , 6 , calculateBearingToDestination (& posControl .desiredState .pos ));
609- DEBUG_SET (DEBUG_ALWAYS , 7 , posControl .actualState .yaw );
606+ // DEBUG_SET(DEBUG_ALWAYS, 1, calculateDistanceToDestination(&posControl.desiredState.pos));
607+ // DEBUG_SET(DEBUG_ALWAYS, 3, mcToiletBowlingHeadingCorrection);
608+ // DEBUG_SET(DEBUG_ALWAYS, 5, posControl.actualState.velXY);
609+ // DEBUG_SET(DEBUG_ALWAYS, 6, calculateBearingToDestination(&posControl.desiredState.pos));
610+ // DEBUG_SET(DEBUG_ALWAYS, 7, posControl.actualState.yaw);
610611 if (navConfig ()-> mc .toiletbowl_detection ) {
611612 if (mcToiletBowlingHeadingCorrection ) {
612613 uint16_t correctedHeading = wrap_36000 (posControl .actualState .yaw - mcToiletBowlingHeadingCorrection );
613614 posControl .actualState .sinYaw = sin_approx (CENTIDEGREES_TO_RADIANS (correctedHeading ));
614615 posControl .actualState .cosYaw = cos_approx (CENTIDEGREES_TO_RADIANS (correctedHeading ));
615- DEBUG_SET (DEBUG_ALWAYS , 4 , correctedHeading );
616+ // DEBUG_SET(DEBUG_ALWAYS, 4, correctedHeading);
616617 } else {
617618 checkForToiletBowling ();
618619 }
0 commit comments