APM:Libraries
|
#include <AP_Camera.h>
Public Member Functions | |
AP_Camera (AP_Relay *obj_relay, uint32_t _log_camera_bit, const struct Location &_loc, const AP_AHRS &_ahrs) | |
AP_Camera (const AP_Camera &other)=delete | |
AP_Camera & | operator= (const AP_Camera &)=delete |
void | control_msg (const mavlink_message_t *msg) |
decode deprecated MavLink message that controls camera. More... | |
void | send_feedback (mavlink_channel_t chan) |
void | configure (float shooting_mode, float shutter_speed, float aperture, float ISO, float exposure_type, float cmd_id, float engine_cutoff_time) |
void | control (float session, float zoom_pos, float zoom_step, float focus_lock, float shooting_cmd, float cmd_id) |
void | set_trigger_distance (uint32_t distance_m) |
void | take_picture () |
void | update () |
void | update_trigger () |
void | set_is_auto_mode (bool enable) |
Static Public Attributes | |
static const struct AP_Param::GroupInfo | var_info [] |
Private Member Functions | |
void | servo_pic () |
Servo operated camera. More... | |
void | relay_pic () |
basic relay activation More... | |
void | feedback_pin_timer () |
void | setup_feedback_callback (void) |
void | log_picture () |
void | trigger_pic () |
void | trigger_pic_cleanup () |
bool | check_trigger_pin (void) |
bool | using_feedback_pin (void) const |
Static Private Member Functions | |
static void | capture_callback (void *context, uint32_t chan_index, hrt_abstime edge_time, uint32_t edge_state, uint32_t overflow) |
Private Attributes | |
AP_Int8 | _trigger_type |
AP_Int8 | _trigger_duration |
AP_Int8 | _relay_on |
AP_Int16 | _servo_on_pwm |
AP_Int16 | _servo_off_pwm |
uint8_t | _trigger_counter |
AP_Relay * | _apm_relay |
AP_Int8 | _auto_mode_only |
bool | _is_in_auto_mode |
AP_Float | _trigg_dist |
AP_Int16 | _min_interval |
AP_Int16 | _max_roll |
uint32_t | _last_photo_time |
struct Location | _last_location |
uint16_t | _image_index |
uint16_t | _feedback_events |
AP_Int8 | _feedback_pin |
AP_Int8 | _feedback_polarity |
bool | _timer_installed:1 |
uint8_t | _last_pin_state |
uint32_t | log_camera_bit |
const struct Location & | current_loc |
const AP_AHRS & | ahrs |
Static Private Attributes | |
static volatile bool | _camera_triggered |
Definition at line 31 of file AP_Camera.h.
|
delete |
|
staticprivate |
Definition at line 349 of file AP_Camera.cpp.
Referenced by setup_feedback_callback().
|
private |
Definition at line 336 of file AP_Camera.cpp.
Referenced by update_trigger().
void AP_Camera::configure | ( | float | shooting_mode, |
float | shutter_speed, | ||
float | aperture, | ||
float | ISO, | ||
float | exposure_type, | ||
float | cmd_id, | ||
float | engine_cutoff_time | ||
) |
Definition at line 189 of file AP_Camera.cpp.
Referenced by AP_Camera(), and GCS_MAVLINK::handle_command_camera().
void AP_Camera::control | ( | float | session, |
float | zoom_pos, | ||
float | zoom_step, | ||
float | focus_lock, | ||
float | shooting_cmd, | ||
float | cmd_id | ||
) |
Definition at line 214 of file AP_Camera.cpp.
Referenced by AP_Camera(), control_msg(), and GCS_MAVLINK::handle_command_camera().
void AP_Camera::control_msg | ( | const mavlink_message_t * | msg | ) |
decode deprecated MavLink message that controls camera.
Definition at line 181 of file AP_Camera.cpp.
Referenced by AP_Camera(), and GCS_MAVLINK::handle_common_camera_message().
|
private |
Definition at line 312 of file AP_Camera.cpp.
Referenced by setup_feedback_callback().
|
private |
Definition at line 400 of file AP_Camera.cpp.
Referenced by trigger_pic().
|
private |
basic relay activation
Definition at line 124 of file AP_Camera.cpp.
Referenced by trigger_pic().
void AP_Camera::send_feedback | ( | mavlink_channel_t | chan | ) |
Definition at line 243 of file AP_Camera.cpp.
Referenced by AP_Camera(), and GCS_MAVLINK::try_send_camera_message().
|
private |
Servo operated camera.
Definition at line 114 of file AP_Camera.cpp.
Referenced by trigger_pic().
|
inline |
Definition at line 73 of file AP_Camera.h.
|
inline |
Definition at line 60 of file AP_Camera.h.
Referenced by GCS_MAVLINK::handle_command_camera().
|
private |
Definition at line 360 of file AP_Camera.cpp.
Referenced by trigger_pic().
void AP_Camera::take_picture | ( | ) |
Definition at line 419 of file AP_Camera.cpp.
Referenced by set_trigger_distance(), and update().
|
private |
single entry point to take pictures set send_mavlink_msg to true to send DO_DIGICAM_CONTROL message to all components
Definition at line 138 of file AP_Camera.cpp.
Referenced by control(), and take_picture().
|
private |
de-activate the trigger after some delay, but without using a delay() function should be called at 50hz
Definition at line 159 of file AP_Camera.cpp.
Referenced by update_trigger().
void AP_Camera::update | ( | void | ) |
Definition at line 267 of file AP_Camera.cpp.
Referenced by set_trigger_distance().
void AP_Camera::update_trigger | ( | ) |
Definition at line 440 of file AP_Camera.cpp.
Referenced by set_trigger_distance().
|
inlineprivate |
Definition at line 129 of file AP_Camera.h.
Referenced by log_picture().
|
private |
Definition at line 82 of file AP_Camera.h.
Referenced by AP_Camera(), relay_pic(), and trigger_pic_cleanup().
|
private |
Definition at line 83 of file AP_Camera.h.
Referenced by update().
|
staticprivate |
Definition at line 108 of file AP_Camera.h.
Referenced by capture_callback(), check_trigger_pin(), and feedback_pin_timer().
|
private |
Definition at line 101 of file AP_Camera.h.
Referenced by send_feedback(), and update_trigger().
|
private |
Definition at line 104 of file AP_Camera.h.
Referenced by feedback_pin_timer(), and setup_feedback_callback().
|
private |
Definition at line 105 of file AP_Camera.h.
Referenced by feedback_pin_timer(), and setup_feedback_callback().
|
private |
Definition at line 100 of file AP_Camera.h.
Referenced by send_feedback(), and trigger_pic().
|
private |
Definition at line 84 of file AP_Camera.h.
Referenced by set_is_auto_mode(), and update().
|
private |
Definition at line 99 of file AP_Camera.h.
Referenced by update().
|
private |
Definition at line 98 of file AP_Camera.h.
Referenced by update().
|
private |
Definition at line 110 of file AP_Camera.h.
Referenced by feedback_pin_timer().
|
private |
Definition at line 97 of file AP_Camera.h.
Referenced by update().
|
private |
Definition at line 96 of file AP_Camera.h.
Referenced by update().
|
private |
Definition at line 78 of file AP_Camera.h.
Referenced by relay_pic(), and trigger_pic_cleanup().
|
private |
Definition at line 80 of file AP_Camera.h.
Referenced by trigger_pic_cleanup().
|
private |
Definition at line 79 of file AP_Camera.h.
Referenced by servo_pic().
|
private |
Definition at line 109 of file AP_Camera.h.
Referenced by setup_feedback_callback().
|
private |
Definition at line 95 of file AP_Camera.h.
Referenced by set_trigger_distance(), and update().
|
private |
Definition at line 81 of file AP_Camera.h.
Referenced by relay_pic(), servo_pic(), and trigger_pic_cleanup().
|
private |
Definition at line 77 of file AP_Camera.h.
Referenced by relay_pic(), and servo_pic().
|
private |
Definition at line 76 of file AP_Camera.h.
Referenced by trigger_pic(), and trigger_pic_cleanup().
|
private |
Definition at line 116 of file AP_Camera.h.
Referenced by log_picture(), send_feedback(), update(), and update_trigger().
|
private |
Definition at line 115 of file AP_Camera.h.
Referenced by log_picture(), send_feedback(), update(), and update_trigger().
|
private |
Definition at line 114 of file AP_Camera.h.
Referenced by log_picture(), and update_trigger().
|
static |
Definition at line 70 of file AP_Camera.h.
Referenced by AP_Camera().