Subversion Repositories FlightCtrl

Compare Revisions

Ignore whitespace Rev 1818 → Rev 1819

/branches/V0.82b-Arthur-P/main.c
10,6 → 10,8
* fc.c: Modified motor smoothing routine.
* timer0.c: Added several variables and modified the servo control routines to allow control to be activated
* through a parameter, and to allow different shutter servo control.
* timer0.c and rc.c: Replaced if(Platinenversion < 20) with a modified if statement to allow parameter control for external
* HEF4017.
* makefile: Modified to correctly name output file to reflect branch name.
All changes are clearly marked similar to this change.
******************************************************************************************************************/
/branches/V0.82b-Arthur-P/rc.c
1,3 → 1,20
/******************************************************************************************************************
V0.82b-Arthur-P 2010-12-18
------------------------------------------------------------------------------------------------------------------
Version includes only support for external HEF4017 for FC1.x hardware, NOT for Twi2Ppm converters for ESCs.
 
2010-12-18 Chanded the if(Platinenversion < 20) statement within this file to correctly identify external HEF4017.
Arthur P. Modified to use several parameters for servo control:
User_Parameter4:
User_Parameter5:
User_Parameter6:
User_Parameter7:
User_Parameter8: Use external HEF4017 if bit 8 is set (>127). The remaining 7 bits are used
for the shutter cycle counter: the value is multiplied by 5 programmatically,
resulting in steps of approx. 0.1sec. Minimum value to start using the
interval timer is 10 (approx. 1 sec, or countervalue of 50). Note that this
was originally done through user para 6.
******************************************************************************************************************/
/*#######################################################################################
Decodieren eines RC Summen Signals
#######################################################################################*/
75,7 → 92,19
PPM_in[index] = tmp;
}
index++;
if(PlatinenVersion < 20)
/******************************************************************************************************************
Arthur P: Modified the code to check the value of parameter 8. If 128 or higher then a HEF4017 is
expected and will be used. Else J7 and J9 are seen as separate normal outputs.
if((PlatinenVersion < 20)
20100802 Inserted changes into v.0.82b code.
******************************************************************************************************************/
 
// if(PlatinenVersion < 20)
 
if((PlatinenVersion < 20) && (Parameter_UserParam8 < 128 ))
/******************************************************************************************************************
Arthur P: End of modification ot if statement.
******************************************************************************************************************/
{
if(index == 5) J3High; else J3Low; // Servosignal an J3 anlegen
if(index == 6) J4High; else J4Low; // Servosignal an J4 anlegen
148,7 → 177,19
ppm_in[index] = tmp;
}
else ROT_ON;
if(PlatinenVersion < 20)
/******************************************************************************************************************
Arthur P: Modified the code to check the value of parameter 8. If 128 or higher then a HEF4017 is
expected and will be used. Else J7 and J9 are seen as separate normal outputs.
if((PlatinenVersion < 20)
20100802 Inserted changes into v.0.82b code.
******************************************************************************************************************/
 
// if(PlatinenVersion < 20)
 
if((PlatinenVersion < 20) && (Parameter_UserParam8 < 128 ))
/******************************************************************************************************************
Arthur P: End of modification ot if statement.
******************************************************************************************************************/
{
if(index == 5) J3High; else J3Low; // Servosignal an J3 anlegen
if(index == 6) J4High; else J4Low; // Servosignal an J4 anlegen
/branches/V0.82b-Arthur-P/timer0.c
3,7 → 3,8
------------------------------------------------------------------------------------------------------------------
Version includes only support for external HEF4017 for FC1.x hardware, NOT for Twi2Ppm converters for ESCs.
 
2010-12-18 Transferred changes to v.0.82b-Arthur-P
2010-12-18 Transferred changes to v.0.82b-Arthur-P and chande the if(Platinenversion < 20) statement in the
new servocontrol calculating routine to correctly identify external HEF4017.
20100917: Transferred changes to v0.80g-Arthur-P.
Arthur P. Modified to use several parameters for servo control:
User_Parameter4:
273,7 → 274,27
{
ServoNickValue = (int16_t)EE_Parameter.ServoNickMax * MULTIPLYER;
}
if(PlatinenVersion < 20) CalculateServoSignals = 0; else CalculateServoSignals++;
/******************************************************************************************************************
Arthur P: Modified the code to check the value of parameter 8. If 128 or higher then a HEF4017 is
expected and will be used. Else J7 and J9 are seen as separate normal outputs.
if((PlatinenVersion < 20)
20100802 Inserted changes into v.0.80d code. This function did not exist prior to v.082. Without
the changes the roll servo does not work, while shutter and nick servo output do work.
******************************************************************************************************************/
 
// if(PlatinenVersion < 20)
 
if((PlatinenVersion < 20) && (Parameter_UserParam8 < 128 ))
/******************************************************************************************************************
Arthur P: End of modification ot if statement.
******************************************************************************************************************/
{
CalculateServoSignals = 0;
}
else
{
CalculateServoSignals++;
}
}
else
{
390,7 → 411,7
case 1: // Nick Compensation Servo
RemainingPulse += ServoNickValue - (256 / 2) * MULTIPLYER; // shift ServoNickValue to center position
break;
case 2: // Roll Compensation Servo
case 2: // Roll Compensation Servo
RemainingPulse += ServoRollValue - (256 / 2) * MULTIPLYER; // shift ServoNickValue to center position
break;
/******************************************************************************************************************