|
Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
#include "modules/digital_cam/dc_shoot_pwm.h"#include "dc.h"#include "generated/airframe.h"#include "generated/modules.h"#include "modules/actuators/actuators.h"
Include dependency graph for dc_shoot_pwm.c:Go to the source code of this file.
Macros | |
| #define | DC_CAM_PWM_SHUTTER_DELAY 0.1 |
| how long to push shutter in seconds | |
| #define | DC_CAM_PWM_ON_VALUE MAX_PPRZ |
| Max PWM Value. | |
| #define | DC_CAM_PWM_OFF_VALUE MIN_PPRZ |
| Min PWM Value. | |
| #define | DC_CAM_PWM_SERVO DC_CAM_TRIGGER |
| Servo destination. | |
| #define | CamActuatorSet(_a, _v) ActuatorSet(_a, _v) |
Functions | |
| void | dc_shoot_pwm_init (void) |
| Initialization function. | |
| void | dc_shoot_pwm_periodic (void) |
| Periodic function to send data. | |
| void | dc_send_command (uint8_t cmd) |
| Send Command To Camera. | |
Variables | |
| static uint8_t | shutter_timer |
| Timer used for Shutter delay control. | |
The quickest the 2000us command should be sent is about once every 1.5s as the camera cannot capture JPG images more quickly than 1.5s. For RAW+JPG mode we recommend a 2.5-3.0s wait time.
RAW images are used for capturing data for reflectance measurements, otherwise the pixels in the JPG are not usable. im_freq_timer should therefore be > 1.5s (=>TRIGGER_CAMERA_CAPTURE_IMAGE_PERIOD = 1.5 seconds)
NMEA GPS data are stored in metadata
**** ThermalCapture ****
Duty cycle < 1500us => TRIGGER_OFF Duty cycle > 1500us => TRIGGER_ON Image capture frequency up to 30 Hz Possibility to capture one frame per trigger in configurator : Trigger frame mode Convert 14-bit data into temperature values : High gain mode: temp [°C] = raw * 0.04 - 273.15 Low gain mode : temp [°C] = raw * 0.4 - 273.15
NMEA GPS data are stored in metadata
**** Trigger system ****
TIME ────────────────────────────────────────────────────────────>
PWM 1000us 2000us 1000us 2000us
Vcc ┌────┐ ┌───────┐ ┌────┐ ┌───────┐
│ OFF│ │ ON │ │ OFF│ │ ON │
0V ────┘ └────────┘ └───────┘ └────────┘ └────
im_freq_timer: ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ 0 ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ 0 ↓↓↓↓↓↓↓↓↓↓ shutter_timer: ↓↓↓↓ 0 ↓↓↓↓ 0
↑ ↑
Picture 1 Picture 2
Definition in file dc_shoot_pwm.c.
Definition at line 97 of file dc_shoot_pwm.c.
Min PWM Value.
Definition at line 89 of file dc_shoot_pwm.c.
Max PWM Value.
Definition at line 84 of file dc_shoot_pwm.c.
| #define DC_CAM_PWM_SERVO DC_CAM_TRIGGER |
Servo destination.
Definition at line 94 of file dc_shoot_pwm.c.
| #define DC_CAM_PWM_SHUTTER_DELAY 0.1 |
how long to push shutter in seconds
Definition at line 79 of file dc_shoot_pwm.c.
Send Command To Camera.
Definition at line 130 of file dc_shoot_pwm.c.
References CamActuatorSet, DC_CAM_PWM_ON_VALUE, DC_CAM_PWM_SERVO, DC_CAM_PWM_SHUTTER_DELAY, dc_send_command_common(), dc_send_shot_position(), DC_SHOOT, foo, and shutter_timer.
Here is the call graph for this function:Initialization function.
Definition at line 107 of file dc_shoot_pwm.c.
References CamActuatorSet, DC_CAM_PWM_OFF_VALUE, DC_CAM_PWM_SERVO, and shutter_timer.
Periodic function to send data.
Definition at line 116 of file dc_shoot_pwm.c.
References CamActuatorSet, DC_CAM_PWM_OFF_VALUE, DC_CAM_PWM_SERVO, dc_periodic(), and shutter_timer.
Here is the call graph for this function:
|
static |
Timer used for Shutter delay control.
Definition at line 102 of file dc_shoot_pwm.c.
Referenced by dc_send_command(), dc_shoot_pwm_init(), and dc_shoot_pwm_periodic().