From 13ea0bb5d8e8c1af1d9a7b430de83c89d7300200 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 20 Dec 2012 14:48:40 +1100 Subject: [PATCH] AP_Camera: disable relay on APM2 --- libraries/AP_Camera/AP_Camera.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libraries/AP_Camera/AP_Camera.cpp b/libraries/AP_Camera/AP_Camera.cpp index f506b63a08..e4e7d68d30 100644 --- a/libraries/AP_Camera/AP_Camera.cpp +++ b/libraries/AP_Camera/AP_Camera.cpp @@ -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;