-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
digital_cam_uart.xml
79 lines (71 loc) · 4.02 KB
/
digital_cam_uart.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<!DOCTYPE module SYSTEM "module.dtd">
<module name="uart_cam_ctrl" dir="digital_cam">
<doc>
<description>
Digital Photo Camera Triggering (using a UART link)
This module controls triggering of an attached external digital camera via UART commands.
It can trigger photos based on GPS distance, time or circle radius in both fixedwings and rotorcraft.
This module fullfilss 4 functions:
1) send shoot commands over UART
2) Besides triggering the shooting of images, the module also sends attitude and other relevant data.
Typically an external linux camera or linux computer will receive the attitude and position data and add
it to the photos.
3) The module will also parse the replies received over the UART. This contains status but can also
contain computer vision results to able to interact with the flightplan.
4) Finally, the module will also relay over telemetry all data it receives from the attached computer
or camera using the PAYLOAD message. This can for instance be used to downlink thumbnails.
The linux program used to parse the UART command is given in the subdirectory.
</description>
<define name="DC_AUTOSHOOT_PERIOD" value="0.5" description="time period for DC_AUTOSHOOT_PERIODIC in seconds"/>
<define name="DC_AUTOSHOOT_DISTANCE_INTERVAL" value="50" description="grid in meters"/>
<define name="DC_SHOT_SYNC_SEND" value="TRUE|FALSE" description="send DC_SHOT message when photo was taken (default: TRUE)"/>
</doc>
<settings>
<dl_settings name="control">
<dl_settings name="dc">
<dl_setting max="255" min="0" step="1" module="digital_cam/dc" var="0" handler="send_command" shortname="Shutter">
<strip_button name="Photo" icon="digital-camera.png" value="32" group="maindc"/>
</dl_setting>
<dl_setting max="3" min="0" step="1" var="dc_autoshoot" values="STOP|PERIODIC|DISTANCE|EXT_TRIG">
<strip_button name="Start Autoshoot" icon="on.png" value="1" group="dcauto"/>
<strip_button name="Stop Autoshoot" icon="off.png" value="0" group="dcauto"/>
</dl_setting>
<dl_setting max="60" min="0.1" step="0.5" var="dc_autoshoot_period" shortname="Periodic" param="DC_AUTOSHOOT_PERIOD" unit="sec"/>
<dl_setting max="255" min="0" step="1" var="dc_distance_interval" shortname="dist" param="DC_AUTOSHOOT_DISTANCE_INTERVAL" unit="meter"/>
<dl_setting max="250" min="0" step="5" module="digital_cam/dc" var="dc_survey_interval" handler="Survey" shortname="Survey-Interval"/>
<dl_setting max="90" min="5" step="5" module="digital_cam/dc" var="dc_circle_interval" handler="Circle" shortname="Circle-Interval"/>
<dl_setting max="1" min="0" step="1" var="dc_cam_tracing" shortname="Cam-Tracing"/>
</dl_settings>
<dl_settings name="tb">
<dl_setting max="2" min="0" step="1" var="digital_cam_uart_thumbnails" shortname="thumbs">
<strip_button name="DL Thumbs High" icon="on.png" value="2" group="ticket"/>
<strip_button name="DL Thumbs Low" icon="on.png" value="1" group="ticket"/>
<strip_button name="DL Thumbs STOP" icon="off.png" value="0" group="ticket"/>
</dl_setting>
<dl_setting max="2" min="0" step="1" var="digital_cam_uart_status" shortname="status" />
</dl_settings>
</dl_settings>
</settings>
<conflicts>digital_cam,digital_cam_servo,digital_cam_i2c</conflicts>
<header>
<file name="uart_cam_ctrl.h"/>
<file name="dc.h"/>
</header>
<init fun="digital_cam_uart_init()"/>
<periodic fun="digital_cam_uart_periodic()" freq="10" autorun="TRUE"/>
<event fun="digital_cam_uart_event()"/>
<makefile target="sim">
<file name="catia/serial.c"/>
</makefile>
<makefile>
<define name="DIGITAL_CAM" />
<file name="uart_cam_ctrl.c"/>
<file name="catia/protocol.c"/>
<file name="dc.c"/>
<raw>
$(TARGET).CFLAGS += -DCAMERA_LINK=$(CAMERA_PORT)
$(TARGET).CFLAGS += -DUSE_$(CAMERA_PORT)
$(TARGET).CFLAGS += -D$(CAMERA_PORT)_BAUD=B115200
</raw>
</makefile>
</module>