AP_Camera: disable relay on APM2

This commit is contained in:
Andrew Tridgell 2012-12-20 14:48:40 +11:00
parent 4a6b46c661
commit 13ea0bb5d8

View File

@ -60,7 +60,9 @@ AP_Camera::servo_pic()
void
AP_Camera::relay_pic()
{
#if CONFIG_HAL_BOARD == HAL_BOARD_APM1
relay.on();
#endif
// leave a message that it should be active for this many loops (assumes 50hz loops)
_trigger_counter = constrain_int16(_trigger_duration*5,0,255);
@ -138,9 +140,11 @@ AP_Camera::trigger_pic_cleanup()
case AP_CAMERA_TRIGGER_TYPE_WP_DISTANCE:
RC_Channel_aux::set_radio(RC_Channel_aux::k_cam_trigger, _servo_off_pwm);
break;
#if CONFIG_HAL_BOARD == HAL_BOARD_APM1
case AP_CAMERA_TRIGGER_TYPE_RELAY:
relay.off();
break;
#endif
case AP_CAMERA_TRIGGER_TYPE_TRANSISTOR:
hal.gpio->write(AP_CAMERA_TRANSISTOR_PIN, 0);
break;