-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathardronelib_fw1.4.6.patch
56 lines (51 loc) · 2.48 KB
/
ardronelib_fw1.4.6.patch
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
diff -ru ARDroneLib/Soft/Common/ardrone_api.h ARDroneLib_FW1.4.6/Soft/Common/ardrone_api.h
--- ARDroneLib/Soft/Common/ardrone_api.h 2010-09-01 08:37:00.000000000 -0700
+++ ARDroneLib_FW1.4.6/Soft/Common/ardrone_api.h 2011-02-04 22:51:16.000000000 -0800
@@ -199,6 +199,7 @@
navdata_vision_detect_t navdata_vision_detect;
navdata_watchdog_t navdata_watchdog;
navdata_adc_data_frame_t navdata_adc_data_frame;
+ navdata_video_stream_t navdata_video_stream;
} navdata_unpacked_t;
#define ardrone_navdata_pack( navdata_ptr, option ) (navdata_option_t*) navdata_pack_option( (uint8_t*) navdata_ptr, \
diff -ru ARDroneLib/Soft/Common/navdata_common.h ARDroneLib_FW1.4.6/Soft/Common/navdata_common.h
--- ARDroneLib/Soft/Common/navdata_common.h 2010-09-17 00:02:55.000000000 -0700
+++ ARDroneLib_FW1.4.6/Soft/Common/navdata_common.h 2011-02-04 22:53:01.000000000 -0800
@@ -180,6 +180,7 @@
NAVDATA_VISION_DETECT_TAG,
NAVDATA_WATCHDOG_TAG,
NAVDATA_ADC_DATA_FRAME_TAG,
+ NAVDATA_VIDEO_STREAM_TAG,
NAVDATA_CKS_TAG = 0xFFFF
} navdata_tag_t;
@@ -483,6 +484,19 @@
uint8_t data_frame[32];
}_ATTRIBUTE_PACKED_ navdata_adc_data_frame_t;
+typedef struct _navdata_video_stream_t {
+ uint16_t tag;
+ uint16_t size;
+
+ uint8_t quant; // quantizer reference used to encode frame [1:31]
+ uint32_t frame_size; // frame size (bytes)
+ uint32_t frame_number; // frame index
+ uint32_t atcmd_ref_seq; // atmcd ref sequence number
+ uint32_t atcmd_mean_ref_gap; // mean time between two consecutive atcmd_ref (ms)
+ float32_t atcmd_var_ref_gap;
+ uint32_t atcmd_ref_quality; // estimator of atcmd link quality
+}_ATTRIBUTE_PACKED_ navdata_video_stream_t;
+
#if defined(_MSC_VER)
/* Go back to default packing policy */
diff -ru ARDroneLib/Soft/Lib/ardrone_tool/Navdata/navdata.c ARDroneLib_FW1.4.6/Soft/Lib/ardrone_tool/Navdata/navdata.c
--- ARDroneLib/Soft/Lib/ardrone_tool/Navdata/navdata.c 2010-03-31 01:58:04.000000000 -0700
+++ ARDroneLib_FW1.4.6/Soft/Lib/ardrone_tool/Navdata/navdata.c 2011-02-04 22:53:45.000000000 -0800
@@ -147,6 +147,10 @@
navdata_option_ptr = NULL; // End of structure
break;
+ case NAVDATA_VIDEO_STREAM_TAG:
+ navdata_option_ptr = ardrone_navdata_unpack( navdata_option_ptr, navdata_unpacked->navdata_video_stream );
+ break;
+
default:
PRINT("Tag %d is not a valid navdata option tag\n", (int) navdata_option_ptr->tag);
navdata_option_ptr = NULL;