diff --git a/conf/settings/modules/cam_roll.xml b/conf/settings/modules/cam_roll.xml index bb09155488..d33d02e320 100644 --- a/conf/settings/modules/cam_roll.xml +++ b/conf/settings/modules/cam_roll.xml @@ -7,8 +7,6 @@ - - diff --git a/sw/airborne/modules/cam_control/cam_roll.c b/sw/airborne/modules/cam_control/cam_roll.c index dd3a86acf1..9110cf9998 100644 --- a/sw/airborne/modules/cam_control/cam_roll.c +++ b/sw/airborne/modules/cam_control/cam_roll.c @@ -48,15 +48,14 @@ float target_x, target_y, target_alt; #define MODE_MANUAL 0 #define MODE_STABILIZED 1 +#ifndef CAM_ROLL_START_MODE +#define CAM_ROLL_START_MODE MODE_MANUAL +#endif + uint8_t cam_roll_mode; -bool_t cam_roll_switch; void cam_init( void ) { - cam_roll_switch = 0; -#if defined VIDEO_SWITCH_PIN && !(defined SITL) - IO0DIR |= _BV(VIDEO_SWITCH_PIN); - IO0CLR = _BV(VIDEO_SWITCH_PIN); -#endif + cam_roll_mode = CAM_ROLL_START_MODE; } void cam_periodic( void ) { diff --git a/sw/airborne/modules/cam_control/cam_roll.h b/sw/airborne/modules/cam_control/cam_roll.h index 21d02eee18..fcd9e7a0c6 100644 --- a/sw/airborne/modules/cam_control/cam_roll.h +++ b/sw/airborne/modules/cam_control/cam_roll.h @@ -25,13 +25,5 @@ extern uint8_t cam_roll_mode; extern float cam_roll_phi; -extern bool_t cam_roll_switch; - -#if defined VIDEO_SWITCH_PIN && !(defined SITL) -#define cam_roll_Switch(_x) { cam_roll_switch = _x; if (_x) IO0SET = _BV(VIDEO_SWITCH_PIN); else IO0CLR = _BV(VIDEO_SWITCH_PIN); } -#else -#define cam_roll_Switch(_x) { cam_roll_switch = _x; } -#endif - #endif /* CAM_ROLL_H */