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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
diff --git a/dl_init_watch.c b/dl_init_watch.c
index 9e88500..d6a7408 100644
--- a/dl_init_watch.c
+++ b/dl_init_watch.c
@@ -86,7 +86,7 @@ WatchInfoPtr dl_init_watch(int type)
result->max_wristapp_len = 0;
result->max_mel_len = 0;
result->pre_notification_time = 0;
- result->time_adjust = 9;
+ result->time_adjust = 2;
break;
case DATALINK_70:
result->dl_device = type;
diff --git a/dl_send_data.c b/dl_send_data.c
index e68904f..af2a24f 100644
--- a/dl_send_data.c
+++ b/dl_send_data.c
@@ -531,13 +531,13 @@ int dl_send_data(WatchInfoPtr wi, int type)
("Can't write to tmp file."));
-#if 0
- memcpy(buf, dend, *dend);
- buf[2] = 1;
-#else
- buf[0]=0x4;
- buf[1]=0x62;
-#endif
+ if (wi->dl_device == DATALINK_50) {
+ buf[0]=0x4;
+ buf[1]=0x62;
+ } else {
+ memcpy(buf, dend, *dend);
+ buf[2] = 1;
+ }
dl_docrc(buf);
@@ -675,11 +675,7 @@ int dl_send_data(WatchInfoPtr wi, int type)
}
/* timezone label packet for IRONMAN watch */
-#if 0
- if (wi->dl_device == DATALINK_IRONMAN)
-#else
- if (1)
-#endif
+ if ((wi->dl_device == DATALINK_IRONMAN) || (wi->dl_device == DATALINK_50))
for (i = 0; i < dl_download_data.num_times; i++)
{
p = 0;
@@ -748,7 +744,7 @@ int dl_send_data(WatchInfoPtr wi, int type)
buf[0] = 0x07;
buf[1] = 0x70;
buf[2] = 0x00;
- buf[3] = 0x61 + dl_download_data.alarms[i].alarm_num;
+ buf[3] = 0x60 + dl_download_data.alarms[i].alarm_num;
buf[4] = 0x00;
dl_docrc(buf);
diff --git a/tools/to_h.c b/tools/to_h.c
new file mode 100644
index 0000000..d2b100d
--- /dev/null
+++ b/tools/to_h.c
@@ -0,0 +1,27 @@
+#include <stdio.h>
+
+
+int main(int argc, char *argv)
+{
+unsigned i,n;
+unsigned char c;
+int fd;
+
+fd=open("DEBUGOUTPUT",0);
+
+
+while (read(fd,&c,1)==1) {
+n=c;
+printf (" 0x%02x, ",c);
+
+for (i=1;i<n;++i) {
+if (!(i%16)) {
+ printf("\n");
+ printf(" ");
+}
+read(fd,&c,1);
+printf ("0x%02x, ",c);
+}
+printf("\n");
+}
+}
|