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 + + +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