[modules] cam_roll: CAM_ROLL_START_MODE and remove cam_roll_switch

This commit is contained in:
Felix Ruess
2014-04-05 20:08:08 +02:00
parent 774595890e
commit 5358b65826
3 changed files with 5 additions and 16 deletions
-2
View File
@@ -7,8 +7,6 @@
</dl_setting>
<dl_setting MAX="1" MIN="0" STEP="1" VAR="cam_roll_mode" module="cam_control/cam_roll" shortname="manual - stablzd">
</dl_setting>
<dl_setting MAX="1" MIN="0" STEP="1" VAR="cam_roll_switch" module="cam_control/cam_roll" shortname="still - mobile" handler="Switch">
</dl_setting>
</dl_settings>
</dl_settings>
</settings>
+5 -6
View File
@@ -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 ) {
@@ -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 */