228,9 → 228,9 |
// Arthur P: Added initialization of the CameraShutterCycle value here as this routine is only |
// called once. This retains all code changes in timer0.c. If parameter 6 > 0 then the user |
// has set a value for the cycle. CameraShuytterCycle == 5x Para6 to get approx 0.1sec increments. |
|
// 090807: Arthur P.: Removed the shutter cycle parts as they may be impacting timing loops. |
// CameraShutterCycle = 5 * Parameter_UserParam6; |
CameraShutterCycle = Parameter_UserParam6; |
// CameraShutterCycle = Parameter_UserParam6; |
|
// Arthur P: Modified the code to scheck 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. |
407,50 → 407,52 |
} |
else |
{ |
if(PPM_in[EE_Parameter.Kanalbelegung[K_POTI3]] > 32) |
// 090807: Arthur P.: Removed the shutter cycle parts as they may be impacting timing loops. |
// if(PPM_in[EE_Parameter.Kanalbelegung[K_POTI3]] > 32) |
// Middle position on a 3 position switch which runs from -127 to +127 |
{ |
// { |
|
RemainingPulse = MINSERVOPULSE + SERVORANGE/2; |
} |
else |
{ |
// Cycle shutter servo between on and off depending upon CameraShutterCycleCounter |
// } |
// else |
// { |
// Cycle shutter servo between on and off depending upon CameraShutterCycleCounter |
// If CameraShutterCylce < 50 then default to continuous shoot. |
if(CameraShutterCycle < 50 ) |
{ |
//if(CameraShutterCycle < 50 ) |
// { |
RemainingPulse = MINSERVOPULSE + SERVORANGE/2; |
} |
else |
{ |
if(CameraShutterCycleCounter == CameraShutterCycle) |
{ |
// } |
// else |
// { |
// if(CameraShutterCycleCounter == CameraShutterCycle) |
// { |
// Shutter on |
CameraShutterCycleCounter = 0; |
RemainingPulse = MINSERVOPULSE + SERVORANGE/2; |
} |
else |
{ |
// CameraShutterCycleCounter = 0; |
// RemainingPulse = MINSERVOPULSE + SERVORANGE/2; |
// } |
// else |
// { |
// Leave on for at least 24 cycles or 0.25 seconds to allow |
// the camera to properly trigger, turn off if past 0.25 sec. |
// For now this is actually set via para5 to allow for a long enough |
// shutter pulse for different cameras. Once it is clear what value |
// works, this can be changed to a hardcoded value. |
if(CameraShutterCycleCounter>Parameter_UserParam5) |
{ |
// if(CameraShutterCycleCounter>Parameter_UserParam5) |
// { |
|
RemainingPulse = MINSERVOPULSE; |
} |
CameraShutterCycleCounter++; |
} |
} |
} |
// RemainingPulse = MINSERVOPULSE; |
// } |
// CameraShutterCycleCounter++; |
// } |
// } |
// } |
} |
break; |
|
default: // other servo channels |
RemainingPulse += 2 * PPM_in[ServoIndex]; // add channel value, factor of 2 because timer 1 increments 3.2µs |
break; |
// 090807 Arthur P: Removed the output of the remaining channels as this just eats time and probably |
// does not have much of a function. Better to add specific outputs as needed. |
// default: // other servo channels |
// RemainingPulse += 2 * PPM_in[ServoIndex]; // add channel value, factor of 2 because timer 1 increments 3.2µs |
// break; |
} |
// range servo pulse width |
if(RemainingPulse > MAXSERVOPULSE ) RemainingPulse = MAXSERVOPULSE; // upper servo pulse limit |