mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-17 23:54:34 +08:00
[modules] cam_roll: CAM_ROLL_START_MODE and remove cam_roll_switch
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user