コミットメタ情報

リビジョン012717e5b499959b2fce11683c5e5cd74400e68a (tree)
日時2019-11-03 18:44:41
作者Satoshi Yasuda <7m3tjz@jarl...>
コミッターSatoshi Yasuda

ログメッセージ

modified: config.h
modified: configure
modified: dmonitor.h
modified: dmonitor_utils.c
modified: inet_read.c
modified: init.h
modified: main.c
modified: rig_read.c

変更サマリ

差分

--- a/config.h
+++ b/config.h
@@ -86,11 +86,7 @@
8686 #define PACKAGE_NAME "dmonitor"
8787
8888 /* Define to the full name and version of this package. */
89-<<<<<<< HEAD
90-#define PACKAGE_STRING "dmonitor 01.24"
91-=======
92-#define PACKAGE_STRING "dmonitor 01.22"
93->>>>>>> 81354636e20f706919e40e1639528b30b06a4f38
89+#define PACKAGE_STRING "dmonitor 01.25"
9490
9591 /* Define to the one symbol short name of this package. */
9692 #define PACKAGE_TARNAME "dmonitor"
@@ -99,18 +95,10 @@
9995 #define PACKAGE_URL ""
10096
10197 /* Define to the version of this package. */
102-<<<<<<< HEAD
103-#define PACKAGE_VERSION "01.24"
104-=======
105-#define PACKAGE_VERSION "01.22"
106->>>>>>> 81354636e20f706919e40e1639528b30b06a4f38
98+#define PACKAGE_VERSION "01.25"
10799
108100 /* Define to 1 if you have the ANSI C header files. */
109101 #define STDC_HEADERS 1
110102
111103 /* Version number of package */
112-<<<<<<< HEAD
113-#define VERSION "01.24"
114-=======
115-#define VERSION "01.22"
116->>>>>>> 81354636e20f706919e40e1639528b30b06a4f38
104+#define VERSION "01.25"
--- a/configure
+++ b/configure
@@ -1,10 +1,6 @@
11 #! /bin/sh
22 # Guess values for system-dependent variables and create Makefiles.
3-<<<<<<< HEAD
4-# Generated by GNU Autoconf 2.69 for dmonitor 01.24.
5-=======
6-# Generated by GNU Autoconf 2.69 for dmonitor 01.22.
7->>>>>>> 81354636e20f706919e40e1639528b30b06a4f38
3+# Generated by GNU Autoconf 2.69 for dmonitor 01.25.
84 #
95 # Report bugs to <7m3tjz@jarl.com>.
106 #
@@ -584,13 +580,8 @@ MAKEFLAGS=
584580 # Identity of this package.
585581 PACKAGE_NAME='dmonitor'
586582 PACKAGE_TARNAME='dmonitor'
587-<<<<<<< HEAD
588-PACKAGE_VERSION='01.24'
589-PACKAGE_STRING='dmonitor 01.24'
590-=======
591-PACKAGE_VERSION='01.22'
592-PACKAGE_STRING='dmonitor 01.22'
593->>>>>>> 81354636e20f706919e40e1639528b30b06a4f38
583+PACKAGE_VERSION='01.25'
584+PACKAGE_STRING='dmonitor 01.25'
594585 PACKAGE_BUGREPORT='7m3tjz@jarl.com'
595586 PACKAGE_URL=''
596587
@@ -1286,11 +1277,7 @@ if test "$ac_init_help" = "long"; then
12861277 # Omit some internal or obsolete options to make the list less imposing.
12871278 # This message is too long to be a string in the A/UX 3.1 sh.
12881279 cat <<_ACEOF
1289-<<<<<<< HEAD
1290-\`configure' configures dmonitor 01.24 to adapt to many kinds of systems.
1291-=======
1292-\`configure' configures dmonitor 01.22 to adapt to many kinds of systems.
1293->>>>>>> 81354636e20f706919e40e1639528b30b06a4f38
1280+\`configure' configures dmonitor 01.25 to adapt to many kinds of systems.
12941281
12951282 Usage: $0 [OPTION]... [VAR=VALUE]...
12961283
@@ -1357,11 +1344,7 @@ fi
13571344
13581345 if test -n "$ac_init_help"; then
13591346 case $ac_init_help in
1360-<<<<<<< HEAD
1361- short | recursive ) echo "Configuration of dmonitor 01.24:";;
1362-=======
1363- short | recursive ) echo "Configuration of dmonitor 01.22:";;
1364->>>>>>> 81354636e20f706919e40e1639528b30b06a4f38
1347+ short | recursive ) echo "Configuration of dmonitor 01.25:";;
13651348 esac
13661349 cat <<\_ACEOF
13671350
@@ -1452,11 +1435,7 @@ fi
14521435 test -n "$ac_init_help" && exit $ac_status
14531436 if $ac_init_version; then
14541437 cat <<\_ACEOF
1455-<<<<<<< HEAD
1456-dmonitor configure 01.24
1457-=======
1458-dmonitor configure 01.22
1459->>>>>>> 81354636e20f706919e40e1639528b30b06a4f38
1438+dmonitor configure 01.25
14601439 generated by GNU Autoconf 2.69
14611440
14621441 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1825,11 +1804,7 @@ cat >config.log <<_ACEOF
18251804 This file contains any messages produced by compilers while
18261805 running configure, to aid debugging if configure makes a mistake.
18271806
1828-<<<<<<< HEAD
1829-It was created by dmonitor $as_me 01.24, which was
1830-=======
1831-It was created by dmonitor $as_me 01.22, which was
1832->>>>>>> 81354636e20f706919e40e1639528b30b06a4f38
1807+It was created by dmonitor $as_me 01.25, which was
18331808 generated by GNU Autoconf 2.69. Invocation command line was
18341809
18351810 $ $0 $@
@@ -2695,11 +2670,7 @@ fi
26952670
26962671 # Define the identity of the package.
26972672 PACKAGE='dmonitor'
2698-<<<<<<< HEAD
2699- VERSION='01.24'
2700-=======
2701- VERSION='01.22'
2702->>>>>>> 81354636e20f706919e40e1639528b30b06a4f38
2673+ VERSION='01.25'
27032674
27042675
27052676 cat >>confdefs.h <<_ACEOF
@@ -4797,11 +4768,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
47974768 # report actual input values of CONFIG_FILES etc. instead of their
47984769 # values after options handling.
47994770 ac_log="
4800-<<<<<<< HEAD
4801-This file was extended by dmonitor $as_me 01.24, which was
4802-=======
4803-This file was extended by dmonitor $as_me 01.22, which was
4804->>>>>>> 81354636e20f706919e40e1639528b30b06a4f38
4771+This file was extended by dmonitor $as_me 01.25, which was
48054772 generated by GNU Autoconf 2.69. Invocation command line was
48064773
48074774 CONFIG_FILES = $CONFIG_FILES
@@ -4867,11 +4834,7 @@ _ACEOF
48674834 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
48684835 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
48694836 ac_cs_version="\\
4870-<<<<<<< HEAD
4871-dmonitor config.status 01.24
4872-=======
4873-dmonitor config.status 01.22
4874->>>>>>> 81354636e20f706919e40e1639528b30b06a4f38
4837+dmonitor config.status 01.25
48754838 configured by $0, generated by GNU Autoconf 2.69,
48764839 with options \\"\$ac_cs_config\\"
48774840
--- a/dmonitor.h
+++ b/dmonitor.h
@@ -27,20 +27,12 @@
2727 #include <wiringPi.h>
2828 #include "config.h"
2929
30-<<<<<<< HEAD
3130 //#define _DEBUG
3231 //#define _DEBUG_RIG
3332 //#define _DEBUG_RIG_9
3433 //#define _DEBUG_INET
3534 //#define _DEBUG_JITTER
36-=======
37-#define _DEBUG
38-#define _DEBUG1
39-#define _DEBUG_RIG
40-#define _DEBUG_INET
41-//#define _DEBUG_JITTER
4235
43->>>>>>> 81354636e20f706919e40e1639528b30b06a4f38
4436 #define GW 0x80
4537 #define ZR 0x40
4638 #define FWD 0x04
@@ -118,7 +110,6 @@ time_t rig_init_time;
118110 int scan_sw;
119111 struct timeval inet_time;
120112 struct timeval c_time;
121-struct timeval rig_send_time_20mSec;
122113
123114 struct timeval rig_send_time;
124115
@@ -146,10 +137,6 @@ int fifo_hold;
146137 int fifo_new_hold;
147138 int rig_last_frame_send;
148139
149-<<<<<<< HEAD
150-=======
151-
152->>>>>>> 81354636e20f706919e40e1639528b30b06a4f38
153140 int inet_led_sw;
154141 int rig_led_sw;
155142
@@ -168,14 +155,6 @@ unsigned int inet_m_save;
168155 long int inet_read_cnt;
169156 long int inet_read_drop_cnt;
170157
171-<<<<<<< HEAD
172-=======
173-unsigned char last_frame_seq;
174-
175-//int rig_voice_ack_wait;
176-//int rig_header_ack_wait;
177-
178->>>>>>> 81354636e20f706919e40e1639528b30b06a4f38
179158 long int jitter_max;
180159 long int jitter_min;
181160 long int jitter_ave;
@@ -185,17 +164,4 @@ int jitter_rd_pnt;
185164 int jitter_wr_cnt;
186165 int jitter_wr_pnt;
187166
188-<<<<<<< HEAD
189167 char ptt;
190-=======
191-unsigned char ptt;
192-unsigned char rig_buffer_save[20];
193-
194-//struct timeval rig_voice_ack_wait_timer;
195-//struct timeval rig_header_ack_wait_timer;
196-
197-//struct timeval ack_timeout;
198-
199-unsigned char recvBuff[256];
200-unsigned char save_buff[17];
201->>>>>>> 81354636e20f706919e40e1639528b30b06a4f38
--- a/dmonitor_utils.c
+++ b/dmonitor_utils.c
@@ -8,7 +8,6 @@ void rig_led_onoff(void);
88 void inet_led_onoff(void);
99 void buff_hold_size (int n);
1010 void rig_send_check (void);
11-int getFifo_length (void);
1211
1312 int rig_open(void)
1413 {
@@ -58,7 +57,7 @@ void pselectSet(void)
5857 {
5958 FD_ZERO (&fd_save);
6059 timeout.tv_sec = 0;
61- timeout.tv_nsec = 5000000;
60+ timeout.tv_nsec = 10000000;
6261 }
6362
6463 void handler (int sig)
@@ -214,7 +213,6 @@ int send_rig (void)
214213 int length;
215214 int rate;
216215
217-<<<<<<< HEAD
218216 length = getFifo (&send_buff[3]);
219217 if (length == 0)
220218 {
@@ -223,26 +221,15 @@ int send_rig (void)
223221 return FALSE;
224222 }
225223 else if (length == 42)
226-=======
227- length = getFifo (&send_buff[3]);
228- if (length == 42)
229->>>>>>> 81354636e20f706919e40e1639528b30b06a4f38
230224 {
231- length = getFifo (&send_buff[3]);
232225 rig_write (42, &send_buff[3]);
233226 seq = 0;
234-<<<<<<< HEAD
235-=======
236- rig_write (3, alive);
237->>>>>>> 81354636e20f706919e40e1639528b30b06a4f38
238227 }
239228 else if (length == 13)
240229 {
241230 send_buff[0] = 0x10;
242231 send_buff[1] = 0x22;
243232 send_buff[2] = seq & 0xff;
244- seq++;
245- seq &= 0xff;
246233 if ((seq % 5) == 0) rig_led_onoff();
247234 send_buff[16] = 0xff;
248235 rig_write (17, send_buff);
@@ -253,11 +240,6 @@ int send_rig (void)
253240 #endif
254241 if (Fifo_cnt < fifo_hold) rig_send_sw = FALSE;
255242 }
256-<<<<<<< HEAD
257-=======
258- //last_frame_seq = send_buff[3];
259- //last_frame_seq &= 0x1f;
260->>>>>>> 81354636e20f706919e40e1639528b30b06a4f38
261243 }
262244 return TRUE;
263245 }
@@ -288,10 +270,7 @@ void LastFrameSend (void)
288270 send_buff[3] |= 0x40;
289271 memcpy (&send_buff[4], last_data1, 3);
290272 rig_write (17, send_buff);
291-<<<<<<< HEAD
292273 drop_rate_print();
293-=======
294->>>>>>> 81354636e20f706919e40e1639528b30b06a4f38
295274 inet_read_cnt = 0;
296275 inet_read_drop_cnt = 0;
297276 rig_last_frame_send = TRUE;
@@ -462,11 +441,7 @@ void jitter_put (unsigned char buff[])
462441 jitter_wr_cnt++;
463442 if (jitter_wr_cnt < 0) jitter_wr_cnt = 0;
464443 #ifdef _DEBUG_JITTER
465-<<<<<<< HEAD
466444 syslog (LOG_INFO, "jitter put %d %d", jitter_wr_pnt, jitter_wr_cnt);
467-=======
468- syslog (LOG_DEBUG, "jitter put jitter write pnt:%d jitter read pnt:%d", jitter_wr_pnt, jitter_wr_cnt);
469->>>>>>> 81354636e20f706919e40e1639528b30b06a4f38
470445 #endif
471446 }
472447
@@ -477,13 +452,8 @@ void jitter_putFifo (void)
477452
478453 if ((jitter_buff[jitter_wr_pnt][0] != 0xff) && (jitter_buff[jitter_wr_pnt][0] & 0x40))
479454 {
480-<<<<<<< HEAD
481455 #ifdef _DEBUG_JITTER
482456 syslog(LOG_INFO, "last freame in jitter");
483-=======
484- #ifdef _DEBUG
485- syslog(LOG_DEBUG, "last frame in jitter");
486->>>>>>> 81354636e20f706919e40e1639528b30b06a4f38
487457 #endif
488458 while (jitter_wr_pnt != jitter_rd_pnt)
489459 {
@@ -500,8 +470,8 @@ void jitter_putFifo (void)
500470 if (jitter_rd_pnt > 20) jitter_rd_pnt = 0;
501471 }
502472 putFifo (13, &jitter_buff[jitter_wr_pnt][0]);
503- jitter_buff_init();
504- memset (inet_frame_id, 0x00, 2);
473+ jitter_buff[jitter_wr_pnt][0] = 0xff;
474+ jitter_rd_pnt = 0;
505475 return;
506476 }
507477 while (jitter_buff[jitter_rd_pnt][0] != 0xff)
@@ -515,17 +485,10 @@ void jitter_putFifo (void)
515485 jitter_wr_cnt--;
516486 }
517487 #ifdef _DEBUG_JITTER
518-<<<<<<< HEAD
519488 syslog (LOG_INFO, "debug %d %d", jitter_wr_pnt, jitter_rd_pnt);
520489 syslog (LOG_INFO, "%2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x",
521490 jitter_buff[0][0], jitter_buff[1][0],jitter_buff[2][0],jitter_buff[3][0],jitter_buff[4][0],
522491 jitter_buff[5][0],jitter_buff[6][0],jitter_buff[7][0],jitter_buff[8][0],jitter_buff[8][0],jitter_buff[10][0],
523-=======
524- syslog (LOG_DEBUG, "debug %d %d", jitter_wr_pnt, jitter_rd_pnt);
525- syslog (LOG_DEBUG, "%2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x",
526- jitter_buff[0][0], jitter_buff[1][0],jitter_buff[2][0],jitter_buff[3][0],jitter_buff[4][0],jitter_buff[5][0],
527- jitter_buff[6][0],jitter_buff[7][0],jitter_buff[8][0],jitter_buff[8][0],jitter_buff[10][0],
528->>>>>>> 81354636e20f706919e40e1639528b30b06a4f38
529492 jitter_buff[11][0], jitter_buff[12][0],jitter_buff[13][0],jitter_buff[14][0],jitter_buff[15][0],
530493 jitter_buff[16][0],jitter_buff[17][0],jitter_buff[18][0],jitter_buff[19][0],jitter_buff[20][0]);
531494 #endif
@@ -544,15 +507,9 @@ void jitter_putFifo (void)
544507 k--;
545508 if (k < 0) k = 20;
546509 }
547-<<<<<<< HEAD
548510 #ifdef _DEBUG_JITTER
549511 syslog (LOG_INFO, "n:%d\n", n);
550512 #endif
551-=======
552- #ifdef _DEBUG_JITTER
553- if (n) syslog (LOG_DEBUG, "n:%d\n", n);
554- #endif
555->>>>>>> 81354636e20f706919e40e1639528b30b06a4f38
556513 }
557514 if (n > 3)
558515 {
@@ -569,11 +526,6 @@ void jitter_putFifo (void)
569526 }
570527 jitter_wr_cnt = 0;
571528 }
572-<<<<<<< HEAD
573-=======
574- //if (jitter_wr_pnt >= jitter_rd_pnt) syslog (LOG_INFO, "jitter0 %d", jitter_wr_pnt - jitter_rd_pnt);
575- //else syslog (LOG_DEBUG, "jitter1 %d", jitter_wr_pnt - jitter_rd_pnt + 1);
576->>>>>>> 81354636e20f706919e40e1639528b30b06a4f38
577529 }
578530
579531 void drop_rate_print (void)
--- a/inet_read.c
+++ b/inet_read.c
@@ -12,13 +12,10 @@ void inet_led_onoff(void);
1212 void connected_table(char str[]);
1313 void error_msg (char str[]);
1414 void jitter_put (unsigned char str[]);
15-<<<<<<< HEAD
1615 void jitter_putFifo(void);
1716 void rig_send_check(void);
18-=======
19-void jitter_buff_init (void);
20->>>>>>> 81354636e20f706919e40e1639528b30b06a4f38
2117
18+unsigned char recvBuff[64];
2219 char LastFrame0[3] = {0x55, 0x55, 0x55};
2320 char LastFrame1[3] = {0x55, 0xc8, 0x7a};
2421 char dummyRFheader[42] = {0x29, 0x20, 0x00, 0x00, 0x00,
@@ -48,24 +45,13 @@ void rig_fifo_check (void)
4845
4946 void dummy_last_frame (void)
5047 {
51-<<<<<<< HEAD
5248 recvBuff[16] = jitter_rd_pnt;
53-=======
54- int rate;
55-
56- recvBuff[16] = jitter_rd_pnt;
57- if (recvBuff[16] > 20) recvBuff[16] = 0;
58->>>>>>> 81354636e20f706919e40e1639528b30b06a4f38
5949 memcpy (&recvBuff[17], NullVoice, 12);
6050 memcpy (&recvBuff[26], LastFrame0, 3);
6151 jitter_put (&recvBuff[16]);
6252 jitter_putFifo();
6353 recvBuff[16]++;
64-<<<<<<< HEAD
6554 if (recvBuff[16] > 20) recvBuff[16] = 0x00;
66-=======
67- if (recvBuff[16] > 20) recvBuff[16] = 0;
68->>>>>>> 81354636e20f706919e40e1639528b30b06a4f38
6955 recvBuff[16] |= 0x40;
7056 memcpy (&recvBuff[17], LastFrame1, 3);
7157 jitter_put (&recvBuff[16]);
@@ -74,23 +60,9 @@ void dummy_last_frame (void)
7460 digitalWrite (INET_LED, 0);
7561 digitalWrite (RIG_LED, 0);
7662 rig_last_frame_send = TRUE;
77-<<<<<<< HEAD
7863 drop_rate_print();
7964 }
8065
81-=======
82- if (inet_read_cnt)
83- {
84- rate = (inet_read_drop_cnt * 10000) / inet_read_cnt;
85- syslog(LOG_INFO, "drop pakcet rate %d.%02d%% (%ld/%ld)",
86- rate/100, rate%100, inet_read_drop_cnt, inet_read_cnt);
87- syslog(LOG_INFO, "jitter info. ave:%ldmSec. max:%ldmSec. min:%ldmSec.",
88- jitter_ave/inet_read_cnt + 20, jitter_max, jitter_min);
89- }
90-}
91-
92-
93->>>>>>> 81354636e20f706919e40e1639528b30b06a4f38
9466 void inet_read(void)
9567 {
9668 int length;
@@ -104,11 +76,8 @@ void inet_read(void)
10476 rig_fifo_check();
10577
10678 k = sizeof (struct sockaddr);
107- length = recvfrom (in_addr_sock, recvBuff, sizeof(recvBuff), 0,
79+ length = recvfrom (in_addr_sock, recvBuff, 64, 0,
10880 (struct sockaddr *)&in_addr, &k);
109- #ifdef _DEBUG_INET
110- syslog (LOG_INFO, "inet_read length:%d", length);
111- #endif
11281 if (length < 0)
11382 {
11483 syslog (LOG_ERR, "recvfrom error (inet_read) %s", strerror (errno));
@@ -160,14 +129,14 @@ void inet_read(void)
160129 inet_m_save &= 0xffff;
161130 if (inet_m != inet_m_save)
162131 {
163- #ifdef _DEBUG_INET
132+ #ifdef _DEBUG
164133 if (inet_m_save != 1) syslog(LOG_ERR, "seq. error recv:%d drop:%d", inet_m, inet_m_save);
165134 #endif
166135 inet_m_save = inet_m;
167136 }
168137 if (recvBuff[13] == 0xff) return;
169138 gettimeofday (&inet_time, NULL);
170- #ifdef _DEBUG_INET
139+ #ifdef _DEBUG
171140 syslog(LOG_INFO, "length:%d FrameID:%2.2x%2.2x seq:%2.2x (Cur.FrameID:%2.2x%2.2x)",
172141 length, recvBuff[14], recvBuff[15], recvBuff[16], inet_frame_id[0], inet_frame_id[1]);
173142 #endif
@@ -193,7 +162,6 @@ void inet_read(void)
193162 jitter_max = 0;
194163 jitter_min = 500000;
195164 jitter_ave = 0;
196- jitter_buff_init();
197165
198166 }
199167 if (!scan_sw)
@@ -212,14 +180,10 @@ void inet_read(void)
212180 {
213181 if (!memcmp (&inet_frame_id, &recvBuff[14], 2))
214182 {
215- #ifdef _DEBUG_INET
216- if ((recvBuff[16] & 0x1f) > 0x14) syslog (LOG_DEBUG, "bad seq. info. %2.2x", recvBuff[16]);
183+ #ifdef _DEBUG
184+ if ((recvBuff[16] & 0x1f) > 0x14) syslog (LOG_INFO, "bad seq. info. %2.2x", recvBuff[16]);
217185 #endif
218186 inet_read_cnt++;
219-<<<<<<< HEAD
220-=======
221- //frame_seq_check ();
222->>>>>>> 81354636e20f706919e40e1639528b30b06a4f38
223187 if (recvBuff[16] == 0x00) inet_led_onoff();
224188 if (recvBuff[16] & 0x40)
225189 {
@@ -236,9 +200,6 @@ void inet_read(void)
236200 inet_recv_time_save.tv_sec = inet_recv_time.tv_sec;
237201 inet_recv_time_save.tv_usec = inet_recv_time.tv_usec;
238202 gettimeofday (&inet_recv_time, NULL);
239- #ifdef _DEBUG_INET
240- syslog (LOG_INFO, "inet read %ldmSec.", inet_recv_time.tv_usec/1000);
241- #endif
242203 timersub (&inet_recv_time, &inet_recv_time_save, &time_sub);
243204 t_sub = time_sub.tv_sec * 1000 + time_sub.tv_usec / 1000;
244205 if (t_sub > jitter_max) jitter_max = t_sub;
@@ -250,18 +211,12 @@ void inet_read(void)
250211 {
251212 if (!memcmp (inet_frame_id, &recvBuff[14], 2))
252213 {
253- #ifdef _DEBUG_INET
214+ #ifdef _DEBUG
254215 if ((recvBuff[16] & 0x1f) > 0x14) syslog (LOG_INFO, "bad seq. info. %2.2x", recvBuff[16]);
255216 #endif
256217 inet_read_cnt++;
257-<<<<<<< HEAD
258218 recvBuff[16] &= 0x1f;
259219 memcpy (&recvBuff[17], NullVoice, 12);
260-=======
261- //frame_seq_check ();
262- //recvBuff[16] &= 0x1f;
263- recvBuff[16] |= 0x40;
264->>>>>>> 81354636e20f706919e40e1639528b30b06a4f38
265220 memset (&recvBuff[26], 0x55, 3);
266221 jitter_put (&recvBuff[16]);
267222 jitter_putFifo();
@@ -274,9 +229,6 @@ void inet_read(void)
274229 inet_recv_time_save.tv_sec = inet_recv_time.tv_sec;
275230 inet_recv_time_save.tv_usec = inet_recv_time.tv_usec;
276231 gettimeofday (&inet_recv_time, NULL);
277- #ifdef _DEBUG_INET
278- syslog (LOG_INFO, "inet read %ldmSec.", inet_recv_time.tv_usec/1000);
279- #endif
280232 timersub (&inet_recv_time, &inet_recv_time_save, &time_sub);
281233 t_sub = time_sub.tv_sec * 1000 + time_sub.tv_usec / 1000;
282234 if (t_sub > jitter_max) jitter_max = t_sub;
--- a/init.h
+++ b/init.h
@@ -5,6 +5,5 @@ unsigned char null_data[3] = {0xe7, 0x84, 0x76};
55 unsigned char last_data0[3] = {0x55, 0x55, 0x55};
66 unsigned char last_data1[3] = {0x55, 0xc8, 0x7a};
77 unsigned char sync_id[3] = {0x55, 0x2d, 0x16};
8-char alive[] = {0x02, 0x02, 0xff};
98
109
--- a/main.c
+++ b/main.c
@@ -24,6 +24,8 @@ void jitter_buff_init (void);
2424
2525 time_t send_time;
2626
27+unsigned char recvBuff[256];
28+
2729 int main(int argc, char *argv[])
2830 {
2931 int length;
@@ -131,14 +133,9 @@ int main(int argc, char *argv[])
131133 rig_send_time_20mSec.tv_sec = 0;
132134 rig_send_time_20mSec.tv_usec = 20000;
133135
134-<<<<<<< HEAD
135136 l_int = (fifo_hold - 5) * 20000;
136137 inet_recv_timeout.tv_sec = l_int / 1000000;
137138 inet_recv_timeout.tv_usec = l_int % 1000000;
138-=======
139- rig_send_timeout.tv_sec = 0;
140- rig_send_timeout.tv_usec = 400000;
141->>>>>>> 81354636e20f706919e40e1639528b30b06a4f38
142139
143140 rig_send_time.tv_sec = 0;
144141 rig_send_time.tv_usec = 0;
@@ -159,11 +156,6 @@ int main(int argc, char *argv[])
159156
160157 rig_buff_pnt = 0;
161158 rig_last_frame_send = TRUE;
162-<<<<<<< HEAD
163-=======
164- //rig_header_ack_wait = FALSE;
165- //rig_voice_ack_wait = FALSE;
166->>>>>>> 81354636e20f706919e40e1639528b30b06a4f38
167159
168160 jitter_buff_init();
169161
@@ -200,16 +192,6 @@ int main(int argc, char *argv[])
200192 {
201193 send_keep_alive();
202194 }
203-<<<<<<< HEAD
204-=======
205-#if 0
206- if ((Fifo_cnt > fifo_hold) && (!rig_send_sw))
207- {
208- rig_send_sw = TRUE;
209- gettimeofday (&rig_send_time, NULL);
210- }
211-#endif
212->>>>>>> 81354636e20f706919e40e1639528b30b06a4f38
213195 if(rig_send_sw)
214196 {
215197 timeradd (&rig_send_time, &rig_send_time_20mSec, &temp_time);
@@ -228,11 +210,6 @@ int main(int argc, char *argv[])
228210 {
229211 syslog(LOG_INFO, "insert dummy_last_frame");
230212 dummy_last_frame();
231-<<<<<<< HEAD
232-=======
233- memset (inet_frame_id, 0x00, 2);
234- jitter_buff_init();
235->>>>>>> 81354636e20f706919e40e1639528b30b06a4f38
236213 }
237214 }
238215 }
--- a/rig_read.c
+++ b/rig_read.c
@@ -12,16 +12,11 @@ int rig_status (void);
1212 void rig_write (int length, unsigned char buff[]);
1313 void rig_led_onoff(void);
1414 void inet_led_onoff(void);
15-<<<<<<< HEAD
1615 int getFifo (char str[]);
1716 void jitter_buff_init (void);
18-=======
19-void jitter_buff_init (void);
20-int getFifo (char str[]);
21->>>>>>> 81354636e20f706919e40e1639528b30b06a4f38
2217
2318 char init_pkt[] = {0xff, 0xff, 0xff};
24-extern char alive[];
19+char alive[] = {0x02, 0x02, 0xff};
2520 int gw_on;
2621 unsigned char rig_buff[1024];
2722
@@ -91,13 +86,8 @@ enum
9186 void rig(void)
9287 {
9388 time_t cur_time;
94-<<<<<<< HEAD
9589 char dummy[42];
9690 int length;
97-=======
98- int length;
99- char dummy[42];
100->>>>>>> 81354636e20f706919e40e1639528b30b06a4f38
10191
10292 switch (rig_state)
10393 {
@@ -117,29 +107,17 @@ void rig(void)
117107 if (rig_init_recv())
118108 {
119109 rig_state = RIG_READ;
120-<<<<<<< HEAD
121110 syslog (LOG_INFO, "RIG(ID-xxPlus) init/re-init done");
122111 memset (inet_frame_id, 0x00, 2);
123112 rig_send_sw = FALSE;
124-=======
125- syslog (LOG_INFO, "RIG(ID-xxPlus) init/re_init done");
126- memset (inet_frame_id, 0x00, 2);
127- rig_send_sw = FALSE;
128- Fifo_cnt = 0;
129->>>>>>> 81354636e20f706919e40e1639528b30b06a4f38
130113 rig_buff_pnt = 0;
131114 rig_last_frame_send = TRUE;
132115 jitter_buff_init();
133116 length = 1;
134-<<<<<<< HEAD
135117 while (length) length = getFifo(dummy);
136118 gettimeofday (&inet_recv_time, NULL);
137119 Fifo_cnt = 0;
138120 rig_send_sw = FALSE;
139-=======
140- while (length) length = getFifo(dummy); // buffer clear
141- gettimeofday (&inet_recv_time, NULL);
142->>>>>>> 81354636e20f706919e40e1639528b30b06a4f38
143121 }
144122 else
145123 {
@@ -152,7 +130,6 @@ void rig(void)
152130 case RIG_READ:
153131 if (!rig_read()) rig_state = RIG_OPEN;
154132 time (&cur_time);
155-<<<<<<< HEAD
156133 if ((cur_time - rig_alive_send_time) >= 1)
157134 {
158135 rig_write (3, alive);
@@ -160,20 +137,6 @@ void rig(void)
160137 digitalWrite (RIG_LED, 0);
161138 }
162139 if ((cur_time - rig_alive_recv) >= 3)
163-=======
164- //if (!rig_header_ack_wait && !rig_voice_ack_wait)
165- if ((inet_frame_id[0] != 0x00) || (inet_frame_id[1] != 0x00))
166- {
167- if ((cur_time - rig_alive_send_time) >= 1)
168- {
169- rig_write (3, alive);
170- rig_alive_send_time = cur_time;
171- digitalWrite (RIG_LED, 0);
172- //rig_ack_wait = TRUE;
173- }
174- }
175- if ((cur_time - rig_alive_recv) >= 10)
176->>>>>>> 81354636e20f706919e40e1639528b30b06a4f38
177140 {
178141 rig_reinit();
179142 }
@@ -203,6 +166,7 @@ int rig_read (void)
203166 int ret;
204167 struct timeval cu_time;
205168 struct timeval t_time;
169+ struct timeval ack_timeout;
206170
207171 if (FD_ISSET (rig_fd, &read_set))
208172 {
@@ -219,11 +183,7 @@ int rig_read (void)
219183 rig_buff_pnt += length;
220184 time (&rig_alive_recv);
221185 #ifdef _DEBUG_RIG
222-<<<<<<< HEAD
223186 syslog (LOG_INFO, "read length:%d (%d) %2.2x", length, rig_buff_pnt, rig_buff[0]);
224-=======
225- syslog (LOG_DEBUG, "read length:%d (%d) %2.2x", length, rig_buff_pnt, rig_buff[0]);
226->>>>>>> 81354636e20f706919e40e1639528b30b06a4f38
227187 #endif
228188 }
229189 while (rig_buff_pnt)
@@ -237,30 +197,18 @@ int rig_read (void)
237197 {
238198 if (rig_buff[1] == 0x21)
239199 {
240-<<<<<<< HEAD
241200 #ifdef _DEBUG_RIG
242201 syslog (LOG_INFO, "ack header:%2.2x seq:%2.2x", rig_buff[1], rig_buff[2]);
243-=======
244- #ifdef _DEBUG_RIG
245- syslog (LOG_DEBUG, "ack header:%2.2x seq:%2.2x", rig_buff[1], rig_buff[2]);
246->>>>>>> 81354636e20f706919e40e1639528b30b06a4f38
247202 #endif
248203 }
249204 else if (rig_buff[1] = 0x03)
250205 {
251206 #ifdef _DEBUG_RIG
252-<<<<<<< HEAD
253207 syslog (LOG_INFO, "ack keep alive:%2.2x seq:%2.2x", rig_buff[1], rig_buff[2]);
254208 #endif
255209 ptt = rig_buff[2];
256210 }
257211
258-=======
259- syslog (LOG_DEBUG, "ack keep alive:%2.2x seq:%2.2x", rig_buff[1], rig_buff[2]);
260- #endif
261- ptt = rig_buff[2];
262- }
263->>>>>>> 81354636e20f706919e40e1639528b30b06a4f38
264212 k = rig_buff_pnt - len;
265213 if (k > 0) memmove(&rig_buff[0], &rig_buff[len], k);
266214 rig_buff_pnt = k;
@@ -273,7 +221,6 @@ int rig_read (void)
273221 if (rig_buff[2] == seq)
274222 {
275223 #ifdef _DEBUG_RIG
276-<<<<<<< HEAD
277224 syslog (LOG_INFO, "ack voice:%2.2x seq:%2.2x(%2.2x) %2.2x",
278225 rig_buff[1], rig_buff[2], seq & 0xff, rig_buff[3]);
279226 #endif
@@ -282,23 +229,6 @@ int rig_read (void)
282229 // seq++;
283230 // seq &= 0xff;
284231 //}
285-=======
286- syslog (LOG_DEBUG, "ack voice:%2.2x seq:%2.2x(%2.2x) %2.2x",
287- rig_buff[1], rig_buff[2], seq & 0xff, rig_buff[3]);
288- #endif
289- if (rig_buff[3] == 0x00)
290- {
291- seq++;
292- seq &= 0xff;
293- }
294-#if 0
295- syslog (LOG_INFO, "%2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x",
296- rig_buff[3], save_buff[2], save_buff[3],
297- save_buff[4], save_buff[5], save_buff[6], save_buff[7], save_buff[8], save_buff[9],
298- save_buff[10], save_buff[11], save_buff[12], save_buff[13], save_buff[14], save_buff[15]);
299-#endif
300-
301->>>>>>> 81354636e20f706919e40e1639528b30b06a4f38
302232 k = rig_buff_pnt - len;
303233 if (k > 0) memmove(&rig_buff[0], &rig_buff[len], k);
304234 rig_buff_pnt = k;
@@ -306,13 +236,8 @@ int rig_read (void)
306236 }
307237 else
308238 {
309-<<<<<<< HEAD
310239 //seq = rig_buff[2] + 1;
311240 //seq &= 0xff;
312-=======
313- seq++;
314- seq &= 0xff;
315->>>>>>> 81354636e20f706919e40e1639528b30b06a4f38
316241 }
317242 #ifdef _DEBUG_RIG
318243 syslog(LOG_INFO, "ack seq error %2.2x %2.2x %2.2x", rig_buff[2], seq, rig_buff[3]);
@@ -422,18 +347,11 @@ int rig_read (void)
422347 }
423348 error_msg_sw = FALSE;
424349
425-<<<<<<< HEAD
426350 if ((Fifo_cnt > (fifo_hold + 20)) || (Fifo_cnt < 0))
427351 {
428352 syslog (LOG_INFO, "rig fifo overflow");
429353 rig_state = RIG_INIT;
430354 drop_rate_print();
431-=======
432- if (Fifo_cnt > (fifo_hold + 10))
433- {
434- syslog (LOG_INFO, "rig Fifo bufer over ");
435- rig_state = RIG_INIT;
436->>>>>>> 81354636e20f706919e40e1639528b30b06a4f38
437355 }
438356 return TRUE;
439357 }
@@ -441,7 +359,6 @@ int rig_read (void)
441359 void rig_write (int length, unsigned char buff[])
442360 {
443361 int ret;
444-<<<<<<< HEAD
445362
446363 if (length == 17)
447364 {
@@ -449,34 +366,16 @@ void rig_write (int length, unsigned char buff[])
449366 seq &= 0xff;
450367 recv_frame_seq = buff[3];
451368 }
452-=======
453- struct timeval c_time;
454->>>>>>> 81354636e20f706919e40e1639528b30b06a4f38
455369
456370 ret = write (rig_fd, buff, length);
457371 if (ret == -1)
458372 {
459373 syslog(LOG_ERR, "rig write error %s", strerror(errno));
460374 }
461-<<<<<<< HEAD
462375 time (&rig_alive_send_time);
463-=======
464- gettimeofday (&c_time, NULL);
465- #ifdef _DEBUG_RIG
466- syslog (LOG_DEBUG, "send time %ldmSec.", c_time.tv_usec/1000);
467- #endif
468->>>>>>> 81354636e20f706919e40e1639528b30b06a4f38
469376 #ifdef _DEBUG_RIG
470377 syslog (LOG_INFO, "rig_write %d %d %2.2x %2.2x", length, ret, buff[2], buff[3]);
471- if (length == 17)
472- {
473- syslog (LOG_INFO, "%2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x",
474- buff[2], buff[3],
475- buff[4], buff[5], buff[6], buff[7], buff[8], buff[9],
476- buff[10], buff[11], buff[12], buff[13], buff[14], buff[15]);
477- }
478378 #endif
479-<<<<<<< HEAD
480379 #ifdef _DEBUG_RIG_9
481380 if (length == 17)
482381 {
@@ -486,9 +385,6 @@ void rig_write (int length, unsigned char buff[])
486385 buff[11], buff[12], buff[13], buff[14], buff[15], buff[16], Fifo_cnt);
487386 }
488387 #endif
489-=======
490- if (length == 17) memcpy (save_buff, buff, 17);
491->>>>>>> 81354636e20f706919e40e1639528b30b06a4f38
492388 }
493389
494390 void send_rig_init (void)
旧リポジトリブラウザで表示