Skip to content
Snippets Groups Projects
Commit 5060b8bd authored by Andrew Tridgell's avatar Andrew Tridgell
Browse files

AP_Camera: updated for new RC_Channel_aux API

parent 540f7894
No related branches found
No related tags found
No related merge requests found
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
#include <AP_Relay.h> #include <AP_Relay.h>
#include <../RC_Channel/RC_Channel_aux.h> #include <../RC_Channel/RC_Channel_aux.h>
extern RC_Channel_aux* g_rc_function[RC_Channel_aux::k_nr_aux_servo_functions]; // the aux. servo ch. assigned to each function
extern int32_t wp_distance; extern int32_t wp_distance;
extern AP_Relay relay; extern AP_Relay relay;
...@@ -26,11 +25,9 @@ const AP_Param::GroupInfo AP_Camera::var_info[] PROGMEM = { ...@@ -26,11 +25,9 @@ const AP_Param::GroupInfo AP_Camera::var_info[] PROGMEM = {
void void
AP_Camera::servo_pic() AP_Camera::servo_pic()
{ {
if (g_rc_function[RC_Channel_aux::k_cam_trigger]) RC_Channel_aux::set_radio_to_max(RC_Channel_aux::k_cam_trigger);
{ // leave a message that it should be active for two event loop cycles
g_rc_function[RC_Channel_aux::k_cam_trigger]->radio_out = g_rc_function[RC_Channel_aux::k_cam_trigger]->radio_max; keep_cam_trigg_active_cycles = 2;
keep_cam_trigg_active_cycles = 2; // leave a message that it should be active for two event loop cycles
}
} }
/// basic relay activation /// basic relay activation
...@@ -115,7 +112,7 @@ AP_Camera::trigger_pic_cleanup() ...@@ -115,7 +112,7 @@ AP_Camera::trigger_pic_cleanup()
case 0: case 0:
case 2: case 2:
case 3: case 3:
G_RC_AUX(k_cam_trigger)->radio_out = g_rc_function[RC_Channel_aux::k_cam_trigger]->radio_min; RC_Channel_aux::set_radio_to_min(RC_Channel_aux::k_cam_trigger);
break; break;
case 1: case 1:
relay.off(); relay.off();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment