The easy way would be hooking it up straight to the receiver, but im running it in PPMsum mode.
Ive looked around in the code, and I suspect my best bet is butchering the camera trigger function.
Would replacing
Code: Select all
#if defined(CAMTRIG)
static uint8_t camCycle = 0;
static uint8_t camState = 0;
static uint32_t camTime = 0;
if (camCycle==1) {
if (camState == 0) {
servo[2] = CAM_SERVO_HIGH;
camState = 1;
camTime = millis();
} else if (camState == 1) {
if ( (millis() - camTime) > CAM_TIME_HIGH ) {
servo[2] = CAM_SERVO_LOW;
camState = 2;
camTime = millis();
}
} else { //camState ==2
if ( (millis() - camTime) > CAM_TIME_LOW ) {
camState = 0;
camCycle = 0;
}
}
}
if (rcOptions[BOXCAMTRIG]) camCycle=1;
#endif
Code: Select all
#if defined(CAMTRIG)
if (rcOptions[BOXCAMTRIG]) servo[2] = CAM_SERVO_HIGH;
else servo[2] = CAM_SERVO_LOW;
#endif
turn A2 into a servo driver that toggles between high and low if I activate/deactivate camtrig with an aux channel?