summaryrefslogtreecommitdiffstats
path: root/master
diff options
context:
space:
mode:
authorYour Name <you@example.com>2019-04-30 14:21:18 +0100
committerYour Name <you@example.com>2019-04-30 14:21:18 +0100
commit83b48025bb4cdebd8a582c9370dd3e5a9e1eb4e2 (patch)
tree896ed09a65495f982fa19f8994f1c703246f2529 /master
parent37daf91cae1298d38ec7a81f97ed907274c59633 (diff)
downloaddatalink-pq-83b48025bb4cdebd8a582c9370dd3e5a9e1eb4e2.tar.gz
datalink-pq-83b48025bb4cdebd8a582c9370dd3e5a9e1eb4e2.tar.bz2
datalink-pq-83b48025bb4cdebd8a582c9370dd3e5a9e1eb4e2.zip
remove last hardcoded 50
Diffstat (limited to 'master')
-rw-r--r--master/model-50-v2.patch47
1 files changed, 19 insertions, 28 deletions
diff --git a/master/model-50-v2.patch b/master/model-50-v2.patch
index 2f93d98..5c719d9 100644
--- a/master/model-50-v2.patch
+++ b/master/model-50-v2.patch
@@ -120,7 +120,7 @@ index 9cfc929..9e88500 100644
result->dl_device = type;
result->max_tz = 2;
diff --git a/dl_send_data.c b/dl_send_data.c
-index 3dfa12e..6dcb577 100644
+index 3dfa12e..f78f07a 100644
--- a/dl_send_data.c
+++ b/dl_send_data.c
@@ -27,10 +27,16 @@
@@ -179,19 +179,7 @@ index 3dfa12e..6dcb577 100644
}
if (!size)
-@@ -119,7 +132,11 @@ int dl_send_data(WatchInfoPtr wi, int type)
- char * template="/datalink_XXXXXX";
- unsigned char buf[64];
- unsigned char data[64];
-+#if 0
- unsigned short addr = 0x0236;
-+#else
-+ unsigned short addr = 0x000e;
-+#endif
- char *protocol;
- AppointmentPtr ap;
- ToDoPtr tp;
-@@ -135,6 +152,14 @@ int dl_send_data(WatchInfoPtr wi, int type)
+@@ -135,6 +148,14 @@ int dl_send_data(WatchInfoPtr wi, int type)
int status;
int ret=0;
int p;
@@ -206,7 +194,7 @@ index 3dfa12e..6dcb577 100644
if (type == BLINK_FILE)
{
-@@ -148,6 +173,7 @@ int dl_send_data(WatchInfoPtr wi, int type)
+@@ -148,6 +169,7 @@ int dl_send_data(WatchInfoPtr wi, int type)
}
else
{
@@ -214,7 +202,7 @@ index 3dfa12e..6dcb577 100644
/* Try to get the directory for a temporary file from
* the envinronment variable TMPDIR
* Try P_tmpdir if that fails
-@@ -171,11 +197,38 @@ int dl_send_data(WatchInfoPtr wi, int type)
+@@ -171,11 +193,41 @@ int dl_send_data(WatchInfoPtr wi, int type)
sprintf(buf, "Can't open %s for writing.", fname);
return ((*dl_error_proc) (buf));
}
@@ -247,6 +235,9 @@ index 3dfa12e..6dcb577 100644
+#endif
}
++ if (wi->dl_device == DATALINK_50)
++ addr = 0x000e;
++
memcpy(buf, start1, *start1);
- if (wi->dl_device == DATALINK_70)
@@ -254,7 +245,7 @@ index 3dfa12e..6dcb577 100644
{
buf[4] = 1;
}
-@@ -212,7 +265,10 @@ int dl_send_data(WatchInfoPtr wi, int type)
+@@ -212,7 +264,10 @@ int dl_send_data(WatchInfoPtr wi, int type)
for (i = 0; i < dl_download_data.num_times; i++)
{
@@ -266,7 +257,7 @@ index 3dfa12e..6dcb577 100644
p = 2;
if (wi->dl_device == DATALINK_IRONMAN)
{
-@@ -235,23 +291,29 @@ int dl_send_data(WatchInfoPtr wi, int type)
+@@ -235,23 +290,29 @@ int dl_send_data(WatchInfoPtr wi, int type)
buf[p++] = dl_download_data.times[i].year;
buf[p++] = dl_download_data.times[i].dow;
buf[p++] = dl_download_data.times[i].seconds;
@@ -308,7 +299,7 @@ index 3dfa12e..6dcb577 100644
}
if (wi->dl_device == DATALINK_150 ||
-@@ -263,7 +325,7 @@ int dl_send_data(WatchInfoPtr wi, int type)
+@@ -263,7 +324,7 @@ int dl_send_data(WatchInfoPtr wi, int type)
dl_download_data.times[i].date_fmt & 0xFF;
}
@@ -317,7 +308,7 @@ index 3dfa12e..6dcb577 100644
buf[1] = TIME_70;
dl_docrc(buf);
-@@ -276,43 +338,80 @@ int dl_send_data(WatchInfoPtr wi, int type)
+@@ -276,43 +337,80 @@ int dl_send_data(WatchInfoPtr wi, int type)
if (wi->dl_device != DATALINK_IRONMAN && dl_download_data.memory)
{
@@ -427,7 +418,7 @@ index 3dfa12e..6dcb577 100644
dl_docrc(buf);
-@@ -320,15 +419,26 @@ int dl_send_data(WatchInfoPtr wi, int type)
+@@ -320,15 +418,26 @@ int dl_send_data(WatchInfoPtr wi, int type)
return ((*dl_error_proc)
("Can't write dinfo to tmp file."));
@@ -459,7 +450,7 @@ index 3dfa12e..6dcb577 100644
for (i = 0; i < dl_download_data.num_apps; i++)
{
ap = &dl_download_data.apps[i];
-@@ -421,8 +531,16 @@ int dl_send_data(WatchInfoPtr wi, int type)
+@@ -421,8 +530,16 @@ int dl_send_data(WatchInfoPtr wi, int type)
return ((*dl_error_proc)
("Can't write to tmp file."));
@@ -476,7 +467,7 @@ index 3dfa12e..6dcb577 100644
dl_docrc(buf);
if (write(ofd, buf, *buf) != *buf)
-@@ -558,7 +676,11 @@ int dl_send_data(WatchInfoPtr wi, int type)
+@@ -558,7 +675,11 @@ int dl_send_data(WatchInfoPtr wi, int type)
}
/* timezone label packet for IRONMAN watch */
@@ -488,7 +479,7 @@ index 3dfa12e..6dcb577 100644
for (i = 0; i < dl_download_data.num_times; i++)
{
p = 0;
-@@ -621,6 +743,22 @@ int dl_send_data(WatchInfoPtr wi, int type)
+@@ -621,6 +742,22 @@ int dl_send_data(WatchInfoPtr wi, int type)
return ((*dl_error_proc)
("Can't write to tmp file."));
@@ -511,7 +502,7 @@ index 3dfa12e..6dcb577 100644
}
for (i = 0; i < dl_download_data.num_timers; i++)
-@@ -673,7 +811,10 @@ int dl_send_data(WatchInfoPtr wi, int type)
+@@ -673,7 +810,10 @@ int dl_send_data(WatchInfoPtr wi, int type)
memcpy(buf, dspace, *dspace);
@@ -523,7 +514,7 @@ index 3dfa12e..6dcb577 100644
buf[1] = DATA_70;
pnum = 1;
-@@ -735,7 +876,10 @@ int dl_send_data(WatchInfoPtr wi, int type)
+@@ -735,7 +875,10 @@ int dl_send_data(WatchInfoPtr wi, int type)
memcpy(buf, dspace, *dspace);
@@ -535,7 +526,7 @@ index 3dfa12e..6dcb577 100644
buf[1] = DATA_70;
pnum = 1;
-@@ -798,6 +942,7 @@ int dl_send_data(WatchInfoPtr wi, int type)
+@@ -798,6 +941,7 @@ int dl_send_data(WatchInfoPtr wi, int type)
close(ofd);
@@ -543,7 +534,7 @@ index 3dfa12e..6dcb577 100644
switch (type)
{
case BLINK_FILE:
-@@ -892,6 +1037,7 @@ int dl_send_data(WatchInfoPtr wi, int type)
+@@ -892,6 +1036,7 @@ int dl_send_data(WatchInfoPtr wi, int type)
break;
}