added post_write_delay

git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@204 7ae35d74-ebe9-4afe-98af-79ac388436b8
Hamlib-1.1.0
Frank Singleton, VK3FCS 2000-10-09 01:17:20 +00:00
rodzic 06a6dca2b8
commit a5bcaa48ca
14 zmienionych plików z 180 dodań i 119 usunięć

60
aclocal.m4 vendored
Wyświetl plik

@ -139,7 +139,7 @@ LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
|| AC_MSG_ERROR([libtool configure failed])
# Reload cache, that may have been modified by ltconfig
@ -171,13 +171,13 @@ AC_REQUIRE([AC_PROG_NM])dnl
AC_REQUIRE([AC_PROG_LN_S])dnl
dnl
case "$target" in
NONE) lt_target="$host" ;;
*) lt_target="$target" ;;
esac
# Check for any special flags to pass to ltconfig.
libtool_flags="--cache-file=$cache_file"
#
# the following will cause an existing older ltconfig to fail, so
# we ignore this at the expense of the cache file... Checking this
# will just take longer ... bummer!
#libtool_flags="--cache-file=$cache_file"
#
test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
@ -194,7 +194,7 @@ test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
# Some flags need to be propagated to the compiler or linker for good
# libtool support.
case "$lt_target" in
case "$host" in
*-*-irix6*)
# Find out which ABI we are using.
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
@ -410,6 +410,7 @@ else
AC_MSG_RESULT(no)
fi
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
AC_SUBST(LD)
AC_PROG_LD_GNU
])
@ -455,13 +456,14 @@ else
fi])
NM="$ac_cv_path_NM"
AC_MSG_RESULT([$NM])
AC_SUBST(NM)
])
# AC_CHECK_LIBM - check for math library
AC_DEFUN(AC_CHECK_LIBM,
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
LIBM=
case "$lt_target" in
case "$host" in
*-*-beos* | *-*-cygwin*)
# These system don't have libm
;;
@ -476,35 +478,31 @@ esac
])
# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
# the libltdl convenience library and INCLTDL to the include flags for
# the libltdl header and adds --enable-ltdl-convenience to the
# configure arguments. Note that LIBLTDL and INCLTDL are not
# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
# provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
# with '${top_builddir}/' and INCLTDL will be prefixed with
# '${top_srcdir}/' (note the single quotes!). If your package is not
# flat and you're not using automake, define top_builddir and
# top_srcdir appropriately in the Makefiles.
# the libltdl convenience library, adds --enable-ltdl-convenience to
# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
# to be `${top_builddir}/libltdl'. Make sure you start DIR with
# '${top_builddir}/' (note the single quotes!) if your package is not
# flat, and, if you're not using automake, define top_builddir as
# appropriate in the Makefiles.
AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
case "$enable_ltdl_convenience" in
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
"") enable_ltdl_convenience=yes
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
esac
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la
INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
])
# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
# the libltdl installable library and INCLTDL to the include flags for
# the libltdl header and adds --enable-ltdl-install to the configure
# arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
# AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
# libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
# be prefixed with '${top_builddir}/' and INCLTDL will be prefixed
# with '${top_srcdir}/' (note the single quotes!). If your package is
# not flat and you're not using automake, define top_builddir and
# top_srcdir appropriately in the Makefiles.
# the libltdl installable library, and adds --enable-ltdl-install to
# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
# to be `${top_builddir}/libltdl'. Make sure you start DIR with
# '${top_builddir}/' (note the single quotes!) if your package is not
# flat, and, if you're not using automake, define top_builddir as
# appropriate in the Makefiles.
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
AC_CHECK_LIB(ltdl, main,
@ -517,8 +515,8 @@ AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
])
if test x"$enable_ltdl_install" = x"yes"; then
ac_configure_args="$ac_configure_args --enable-ltdl-install"
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la
INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
else
ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
LIBLTDL="-lltdl"

54
configure vendored
Wyświetl plik

@ -1528,7 +1528,7 @@ else
int main() {
/* Ultrix mips cc rejects this. */
typedef int charset[2]; const charset x = {0,0};
typedef int charset[2]; const charset x;
/* SunOS 4.1.1 cc rejects this. */
char const *const *ccp;
char **p;
@ -1603,7 +1603,7 @@ for ac_kw in inline __inline__ __inline; do
#include "confdefs.h"
int main() {
} int $ac_kw foo() {
} $ac_kw foo() {
; return 0; }
EOF
if { (eval echo configure:1610: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
@ -2252,8 +2252,9 @@ else
echo "$ac_t""no" 1>&6
fi
test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
echo "configure:2257: checking if the linker ($LD) is GNU ld" >&5
echo "configure:2258: checking if the linker ($LD) is GNU ld" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2269,7 +2270,7 @@ echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
echo "configure:2273: checking for BSD-compatible nm" >&5
echo "configure:2274: checking for BSD-compatible nm" >&5
if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2305,13 +2306,14 @@ NM="$ac_cv_path_NM"
echo "$ac_t""$NM" 1>&6
case "$target" in
NONE) lt_target="$host" ;;
*) lt_target="$target" ;;
esac
# Check for any special flags to pass to ltconfig.
libtool_flags="--cache-file=$cache_file"
#
# the following will cause an existing older ltconfig to fail, so
# we ignore this at the expense of the cache file... Checking this
# will just take longer ... bummer!
#libtool_flags="--cache-file=$cache_file"
#
test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
@ -2330,11 +2332,11 @@ test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
# Some flags need to be propagated to the compiler or linker for good
# libtool support.
case "$lt_target" in
case "$host" in
*-*-irix6*)
# Find out which ABI we are using.
echo '#line 2337 "configure"' > conftest.$ac_ext
if { (eval echo configure:2338: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
echo '#line 2339 "configure"' > conftest.$ac_ext
if { (eval echo configure:2340: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
case "`/usr/bin/file conftest.o`" in
*32-bit*)
LD="${LD-ld} -32"
@ -2355,19 +2357,19 @@ case "$lt_target" in
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -belf"
echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
echo "configure:2359: checking whether the C compiler needs -belf" >&5
echo "configure:2361: checking whether the C compiler needs -belf" >&5
if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2364 "configure"
#line 2366 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
if { (eval echo configure:2371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
lt_cv_cc_needs_belf=yes
else
@ -2445,7 +2447,7 @@ LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
# Reload cache, that may have been modified by ltconfig
@ -2474,17 +2476,17 @@ if test "${enable_dynamic}" != "no"; then
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2478: checking for $ac_hdr" >&5
echo "configure:2480: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2483 "configure"
#line 2485 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2488: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2490: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@ -2505,7 +2507,7 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
#define $ac_tr_hdr 1
EOF
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
echo "configure:2509: checking for dlopen in -ldl" >&5
echo "configure:2511: checking for dlopen in -ldl" >&5
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -2513,7 +2515,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2517 "configure"
#line 2519 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@ -2524,7 +2526,7 @@ int main() {
dlopen()
; return 0; }
EOF
if { (eval echo configure:2528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -2554,12 +2556,12 @@ fi
for ac_func in dlopen
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:2558: checking for $ac_func" >&5
echo "configure:2560: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2563 "configure"
#line 2565 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -2582,7 +2584,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:2586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -2798,6 +2800,8 @@ s%@build_cpu@%$build_cpu%g
s%@build_vendor@%$build_vendor%g
s%@build_os@%$build_os%g
s%@RANLIB@%$RANLIB%g
s%@LD@%$LD%g
s%@NM@%$NM%g
s%@LIBTOOL@%$LIBTOOL%g
s%@INCLUDES@%$INCLUDES%g
s%@NET@%$NET%g

Wyświetl plik

@ -7,7 +7,7 @@
* box (FIF-232C) or similar
*
*
* $Id: ft747.c,v 1.16 2000-10-08 23:06:17 javabear Exp $
* $Id: ft747.c,v 1.17 2000-10-09 01:17:19 javabear Exp $
*
*
* This program is free software; you can redistribute it and/or
@ -78,7 +78,7 @@ static int ft747_get_update_data(RIG *rig);
const struct rig_caps ft747_caps = {
RIG_MODEL_FT747, "FT-747GX", "Yaesu", "0.1", RIG_STATUS_ALPHA,
RIG_TYPE_MOBILE, RIG_PTT_NONE, 4800, 4800, 8, 2, RIG_PARITY_NONE,
RIG_HANDSHAKE_NONE, 50, 2000, 0,FT747_FUNC_ALL,20,RIG_TRN_OFF,
RIG_HANDSHAKE_NONE, FT747_WRITE_DELAY, FT747_POST_WRITE_DELAY, 2000, 0,FT747_FUNC_ALL,20,RIG_TRN_OFF,
{ {100000,29999900,FT747_ALL_RX_MODES,-1,-1}, {0,0,0,0,0}, }, /* rx range */
{ {1500000,1999900,FT747_OTHER_TX_MODES,5000,100000}, /* 100W class */
@ -208,7 +208,6 @@ int ft747_cleanup(RIG *rig) {
return RIG_OK;
}
/*
* ft747_open routine
*
@ -221,6 +220,10 @@ int ft747_open(RIG *rig) {
return -RIG_EINVAL;
rig_s = &rig->state;
printf("ft747:rig_open: write_delay = %i \n", rig_s->write_delay);
printf("ft747:rig_open: post_write_delay = %i \n", rig_s->post_write_delay);
/* TODO */
@ -285,6 +288,7 @@ int ft747_set_mode(RIG *rig, rmode_t rmode) {
/*
* translate mode from generic to ft747 specific
*/
printf("rmode = %x \n", rmode);
switch(rmode) {
@ -320,7 +324,7 @@ int ft747_set_mode(RIG *rig, rmode_t rmode) {
}
cmd[3] = mymode;
write_block(rig_s->fd, cmd, FT747_CMD_LENGTH, rig_s->write_delay);
write_block(rig_s->fd, cmd, FT747_CMD_LENGTH, rig_s->write_delay, rig_s->post_write_delay);
return RIG_OK; /* good */
}
@ -400,10 +404,10 @@ int ft747_set_vfo(RIG *rig, vfo_t vfo) {
switch(vfo) {
case RIG_VFO_A:
write_block(rig_s->fd, cmd_A, FT747_CMD_LENGTH, rig_s->write_delay);
write_block(rig_s->fd, cmd_A, FT747_CMD_LENGTH, rig_s->write_delay, rig_s->post_write_delay);
return RIG_OK;
case RIG_VFO_B:
write_block(rig_s->fd, cmd_B, FT747_CMD_LENGTH, rig_s->write_delay);
write_block(rig_s->fd, cmd_B, FT747_CMD_LENGTH, rig_s->write_delay, rig_s->post_write_delay);
return RIG_OK;
default:
return -RIG_EINVAL; /* sorry, wrong VFO */
@ -432,10 +436,10 @@ int ft747_set_ptt(RIG *rig, ptt_t ptt) {
switch(ptt) {
case RIG_PTT_OFF:
write_block(rig_s->fd, cmd_ptt_off, FT747_CMD_LENGTH, rig_s->write_delay);
write_block(rig_s->fd, cmd_ptt_off, FT747_CMD_LENGTH, rig_s->write_delay, rig_s->post_write_delay);
return RIG_OK;
case RIG_PTT_ON:
write_block(rig_s->fd, cmd_ptt_on, FT747_CMD_LENGTH, rig_s->write_delay);
write_block(rig_s->fd, cmd_ptt_on, FT747_CMD_LENGTH, rig_s->write_delay, rig_s->post_write_delay);
return RIG_OK;
default:
return -RIG_EINVAL; /* sorry, wrong VFO */
@ -473,11 +477,11 @@ static int ft747_get_update_data(RIG *rig) {
cmd_pace[3] = p->pacing; /* get pacing value */
printf("read pacing = %i \n",p->pacing);
write_block(rig_s->fd, cmd_pace, FT747_CMD_LENGTH, rig_s->write_delay);
write_block(rig_s->fd, cmd_pace, FT747_CMD_LENGTH, rig_s->write_delay, rig_s->post_write_delay);
printf("read timeout = %i \n",FT747_DEFAULT_READ_TIMEOUT);
write_block(rig_s->fd, cmd_update, FT747_CMD_LENGTH, rig_s->write_delay); /* request data */
write_block(rig_s->fd, cmd_update, FT747_CMD_LENGTH, rig_s->write_delay, rig_s->post_write_delay); /* request data */
n = read_sleep(rig_s->fd,p->update_data, FT747_STATUS_UPDATE_DATA_LENGTH, FT747_DEFAULT_READ_TIMEOUT);
/* n = read_block(rig_s->fd,p->update_data, FT747_STATUS_UPDATE_DATA_LENGTH, FT747_DEFAULT_READ_TIMEOUT); */

Wyświetl plik

@ -7,7 +7,7 @@
* box (FIF-232C) or similar (max232 + some capacitors :-)
*
*
* $Id: ft747.h,v 1.12 2000-10-08 22:58:02 javabear Exp $
* $Id: ft747.h,v 1.13 2000-10-09 01:17:19 javabear Exp $
*
*
* This program is free software; you can redistribute it and/or
@ -35,6 +35,13 @@
#define FT747_PACING_INTERVAL 5
#define FT747_PACING_DEFAULT_VALUE 0
#define FT747_WRITE_DELAY 50
/* Sequential fast writes confuse FT747 without this delay */
#define FT747_POST_WRITE_DELAY 5
/* Rough safe value for default timeout */

Wyświetl plik

@ -6,7 +6,7 @@
* via serial interface to an FT-847 using the "CAT" interface.
*
*
* $Id: ft847.c,v 1.22 2000-10-08 21:57:40 f4cfe Exp $
* $Id: ft847.c,v 1.23 2000-10-09 01:17:19 javabear Exp $
*
*
*
@ -69,7 +69,7 @@ int ft847_set_freq_main_vfo_hz(RIG *rig, freq_t freq, rmode_t mode);
const struct rig_caps ft847_caps = {
RIG_MODEL_FT847, "FT-847", "Yaesu", "0.1", RIG_STATUS_ALPHA,
RIG_TYPE_TRANSCEIVER,RIG_PTT_NONE, 4800, 57600, 8, 2, RIG_PARITY_NONE,
RIG_HANDSHAKE_NONE, 50, 100, 0, FT847_FUNC_ALL, 78, RIG_TRN_OFF,
RIG_HANDSHAKE_NONE,FT847_WRITE_DELAY ,FT847_POST_WRITE_DELAY, 100, 0, FT847_FUNC_ALL, 78, RIG_TRN_OFF,
{ {100000,76000000,FT847_ALL_RX_MODES,-1,-1}, /* rx range begin */
{108000000,174000000,FT847_ALL_RX_MODES,-1,-1},
{420000000,512000000,FT847_ALL_RX_MODES,-1,-1},
@ -208,7 +208,7 @@ int ft847_open(RIG *rig) {
/* Good time to set CAT ON */
write_block(rig_s->fd, cmd, FT847_CMD_LENGTH, rig_s->write_delay);
write_block(rig_s->fd, cmd, FT847_CMD_LENGTH, rig_s->write_delay, rig_s->post_write_delay);
return RIG_OK;
}
@ -228,7 +228,7 @@ int ft847_close(RIG *rig) {
/* Good time to set CAT OFF */
write_block(rig_s->fd, cmd, FT847_CMD_LENGTH, rig_s->write_delay);
write_block(rig_s->fd, cmd, FT847_CMD_LENGTH, rig_s->write_delay, rig_s->post_write_delay);
return RIG_OK;
}
@ -292,10 +292,10 @@ int ft847_set_ptt(RIG *rig, ptt_t ptt) {
switch(ptt) {
case RIG_PTT_ON:
write_block(rig_s->fd, cmd_A, FT847_CMD_LENGTH, rig_s->write_delay);
write_block(rig_s->fd, cmd_A, FT847_CMD_LENGTH, rig_s->write_delay, rig_s->post_write_delay);
return RIG_OK;
case RIG_PTT_OFF:
write_block(rig_s->fd, cmd_B, FT847_CMD_LENGTH, rig_s->write_delay);
write_block(rig_s->fd, cmd_B, FT847_CMD_LENGTH, rig_s->write_delay, rig_s->post_write_delay);
return RIG_OK;
default:
return -RIG_EINVAL; /* sorry, wrong ptt range */
@ -333,7 +333,7 @@ int ft847_set_freq_main_vfo_hz(RIG *rig, freq_t freq, rmode_t mode) {
* should check return code and that write wrote cmd_len chars!
*/
write_block(rig_s->fd, data, frm_len, rig_s->write_delay);
write_block(rig_s->fd, data, frm_len, rig_s->write_delay, rig_s->post_write_delay);
/*
* wait for ACK ... etc..

Wyświetl plik

@ -6,7 +6,7 @@
* via serial interface to an FT-847 using the "CAT" interface.
*
*
* $Id: ft847.h,v 1.15 2000-10-01 23:49:08 javabear Exp $
* $Id: ft847.h,v 1.16 2000-10-09 01:17:19 javabear Exp $
*
*
* This program is free software; you can redistribute it and/or
@ -29,7 +29,18 @@
#define _FT847_H 1
#define FT847_CMD_LENGTH 5
#define FT847_CMD_LENGTH 5
#define FT847_WRITE_DELAY 50
/* Sequential fast writes may confuse FT847 without this delay */
#define FT847_POST_WRITE_DELAY 50
/* Rough safe value for default timeout */
#define FT847_DEFAULT_READ_TIMEOUT 2000
/*

Wyświetl plik

@ -6,7 +6,7 @@
* CI-V interface, used in serial communication to ICOM radios.
*
*
* $Id: frame.c,v 1.2 2000-10-08 21:26:33 f4cfe Exp $
* $Id: frame.c,v 1.3 2000-10-09 01:17:19 javabear Exp $
*
*
*
@ -157,7 +157,7 @@ int icom_transaction (RIG *rig, int cmd, int subcmd, const char *payload, int pa
/*
* should check return code and that write wrote cmd_len chars!
*/
write_block(rig_s->fd, buf, frm_len, rig_s->write_delay);
write_block(rig_s->fd, buf, frm_len, rig_s->write_delay, rig_s->post_write_delay);
/*
* read what we just sent, because TX and RX are looped,

Wyświetl plik

@ -7,7 +7,7 @@
* using the "CI-V" interface.
*
*
* $Id: ic706.c,v 1.4 2000-10-08 21:37:19 f4cfe Exp $
* $Id: ic706.c,v 1.5 2000-10-09 01:17:19 javabear Exp $
*
*
*
@ -61,7 +61,7 @@
const struct rig_caps ic706_caps = {
RIG_MODEL_IC706, "IC-706", "Icom", "0.2", RIG_STATUS_ALPHA,
RIG_TYPE_MOBILE, RIG_PTT_NONE, 300, 19200, 8, 1, RIG_PARITY_NONE,
RIG_HANDSHAKE_NONE, 0, 2000, 3, IC706_FUNC_ALL, 101, RIG_TRN_ON,
RIG_HANDSHAKE_NONE, 0, 0, 2000, 3, IC706_FUNC_ALL, 101, RIG_TRN_ON,
{ {KHz(30),199999999,IC706_ALL_RX_MODES,-1,-1},{0,0,0,0,0}, }, /* rx range */
{ {KHz(1800),1999999,IC706_OTHER_TX_MODES,5000,100000}, /* 100W class */
{KHz(1800),1999999,IC706_AM_TX_MODES,2000,40000}, /* 40W class */
@ -107,7 +107,7 @@ const struct rig_caps ic706_caps = {
const struct rig_caps ic706mkii_caps = {
RIG_MODEL_IC706MKII, "IC-706MKII", "Icom", "0.2", RIG_STATUS_ALPHA,
RIG_TYPE_MOBILE, RIG_PTT_NONE, 300, 19200, 8, 1, RIG_PARITY_NONE,
RIG_HANDSHAKE_NONE, 0, 2000, 3, IC706_FUNC_ALL, 101, RIG_TRN_ON,
RIG_HANDSHAKE_NONE, 0, 0, 2000, 3, IC706_FUNC_ALL, 101, RIG_TRN_ON,
{ {30000,199999999,IC706_ALL_RX_MODES,-1,-1}, {0,0,0,0,0}, }, /* rx range */
{ {1800000,1999999,IC706_OTHER_TX_MODES,5000,100000}, /* 100W class */
{1800000,1999999,IC706_AM_TX_MODES,2000,40000}, /* 40W class */
@ -158,7 +158,7 @@ const struct rig_caps ic706mkii_caps = {
const struct rig_caps ic706mkiig_caps = {
RIG_MODEL_IC706MKIIG, "IC-706MKIIG", "Icom", "0.2", RIG_STATUS_ALPHA,
RIG_TYPE_MOBILE, RIG_PTT_NONE, 300, 19200, 8, 1, RIG_PARITY_NONE,
RIG_HANDSHAKE_NONE, 0, 2000, 3, IC706_FUNC_ALL|RIG_FUNC_NR|RIG_FUNC_ANF, 101, RIG_TRN_ON,
RIG_HANDSHAKE_NONE, 0, 0, 2000, 3, IC706_FUNC_ALL|RIG_FUNC_NR|RIG_FUNC_ANF, 101, RIG_TRN_ON,
{ {30000,199999999,IC706_ALL_RX_MODES,-1,-1}, /* this trx also has UHF */
{400000000,470000000,IC706_ALL_RX_MODES,-1,-1}, {0,0,0,0,0}, },
{ {1800000,1999999,IC706_OTHER_TX_MODES,5000,100000}, /* 100W class */

Wyświetl plik

@ -5,7 +5,7 @@
* will be used for obtaining rig capabilities.
*
*
* $Id: rig.h,v 1.1 2000-10-08 21:15:28 f4cfe Exp $ *
* $Id: rig.h,v 1.2 2000-10-09 01:17:20 javabear Exp $ *
*
*
* This program is free software; you can redistribute it and/or
@ -306,6 +306,7 @@ struct rig_caps {
enum serial_parity_e serial_parity; /* */
enum serial_handshake_e serial_handshake; /* */
int write_delay; /* delay in ms between each byte sent out */
int post_write_delay; /* optional delay after sending last cmd sequence (yaesu) -- FS */
int timeout; /* in ms */
int retry; /* maximum number of retries, 0 to disable */
unsigned long has_func; /* bitwise OR'ed RIG_FUNC_FAGC, NG, etc. */
@ -410,30 +411,31 @@ struct rig_caps {
* Rig state
*/
struct rig_state {
enum rig_port_e port_type; /* serial, network, etc. */
int serial_rate;
int serial_data_bits; /* eg 8 */
int serial_stop_bits; /* eg 2 */
enum serial_parity_e serial_parity; /* */
enum serial_handshake_e serial_handshake; /* */
int write_delay; /* delay in ms between each byte sent out */
int timeout; /* in ms */
int retry; /* maximum number of retries, 0 to disable */
enum ptt_type_e ptt_type; /* how we will key the rig */
char ptt_path[FILPATHLEN]; /* path to the keying device (serial,//) */
double vfo_comp; /* VFO compensation in PPM, 0.0 to disable */
char rig_path[FILPATHLEN]; /* serial port/network path(host:port) */
int fd; /* serial port/socket file handle */
FILE *stream; /* serial port/socket (buffered) stream handle */
int transceive; /* wether the transceive mode is on */
int hold_decode;/* set to 1 to hold the event decoder (async) otherwise 0 */
/*
* Pointer to private data
* tuff like CI_V_address for Icom goes in this *priv 51 area
*/
void *priv; /* pointer to private data */
/* etc... */
enum rig_port_e port_type; /* serial, network, etc. */
int serial_rate;
int serial_data_bits; /* eg 8 */
int serial_stop_bits; /* eg 2 */
enum serial_parity_e serial_parity; /* */
enum serial_handshake_e serial_handshake; /* */
int write_delay; /* delay in ms between each byte sent out */
int post_write_delay; /* for some yaesu rigs */
int timeout; /* in ms */
int retry; /* maximum number of retries, 0 to disable */
enum ptt_type_e ptt_type; /* how we will key the rig */
char ptt_path[FILPATHLEN]; /* path to the keying device (serial,//) */
double vfo_comp; /* VFO compensation in PPM, 0.0 to disable */
char rig_path[FILPATHLEN]; /* serial port/network path(host:port) */
int fd; /* serial port/socket file handle */
FILE *stream; /* serial port/socket (buffered) stream handle */
int transceive; /* wether the transceive mode is on */
int hold_decode;/* set to 1 to hold the event decoder (async) otherwise 0 */
/*
* Pointer to private data
* tuff like CI_V_address for Icom goes in this *priv 51 area
*/
void *priv; /* pointer to private data */
/* etc... */
};
/*

Wyświetl plik

@ -2,7 +2,7 @@
Copyright (C) 2000 Stephane Fillod and Frank Singleton
This file is part of the hamlib package.
$Id: rig.c,v 1.2 2000-10-08 21:45:20 f4cfe Exp $
$Id: rig.c,v 1.3 2000-10-09 01:17:20 javabear Exp $
Hamlib is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
@ -160,6 +160,9 @@ RIG *rig_init(rig_model_t rig_model)
rig->state.serial_stop_bits = rig->caps->serial_stop_bits;
rig->state.serial_parity = rig->caps->serial_parity;
rig->state.serial_handshake = rig->caps->serial_handshake;
rig->state.write_delay = rig->caps->write_delay;
rig->state.post_write_delay = rig->caps->post_write_delay;
rig->state.timeout = rig->caps->timeout;
rig->state.retry = rig->caps->retry;
rig->state.transceive = rig->caps->transceive;

Wyświetl plik

@ -6,7 +6,7 @@
* Provides useful routines for read/write serial data for communicating
* via serial interface.
*
* $Id: serial.c,v 1.2 2000-10-08 21:46:09 f4cfe Exp $
* $Id: serial.c,v 1.3 2000-10-09 01:17:20 javabear Exp $
*
*
* This program is free software; you can redistribute it and/or
@ -308,9 +308,14 @@ int read_sleep(int fd, unsigned char *rxbuffer, int num , int read_delay) {
* Write a block of count characters to file descriptor,
* with a pause between each character if write_delay is > 0
*
* The delay is for Yaesu type rigs..require 5 character
* The write_delay is for Yaesu type rigs..require 5 character
* sequence to be sent with 50-200msec between each char.
*
* Also, post_write_delay is for some Yaesu rigs (eg: FT747) that
* get confused with sequential fast writes between cmd sequences.
*
*
*
* input:
*
* fd - file descriptor to write to
@ -327,7 +332,7 @@ int read_sleep(int fd, unsigned char *rxbuffer, int num , int read_delay) {
* it could work very well also with any file handle, like a socket.
*/
int write_block(int fd, const unsigned char *txbuffer, size_t count, int write_delay)
int write_block(int fd, const unsigned char *txbuffer, size_t count, int write_delay, int post_write_delay)
{
int i;
@ -342,6 +347,12 @@ int write_block(int fd, const unsigned char *txbuffer, size_t count, int write_d
} else {
write(fd, txbuffer, count);
}
if(post_write_delay > 0)
usleep(post_write_delay*1000); /* optional delay after last write */
/* otherwise some yaesu rigs get confused */
/* with sequential fast writes*/
rig_debug(RIG_DEBUG_TRACE,"TX %d bytes\n",count);
dump_hex(txbuffer,count);

Wyświetl plik

@ -6,7 +6,7 @@
* Provides useful routines for read/write serial data for communicating
* via serial interface .
*
* $Id: serial.h,v 1.2 2000-10-08 21:46:48 f4cfe Exp $
* $Id: serial.h,v 1.3 2000-10-09 01:17:20 javabear Exp $
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -35,7 +35,7 @@ int serial_open(struct rig_state *rs);
int read_sleep(int fd, unsigned char *rxbuffer, int num , int read_delay);
int read_block(int fd, unsigned char *rxbuffer, size_t count, int timeout);
int write_block(int fd, const unsigned char *txbuffer, size_t count, int write_delay);
int write_block(int fd, const unsigned char *txbuffer, size_t count, int write_delay, int post_write_delay);
int fread_block(FILE *stream, unsigned char *rxbuffer, size_t count, int timeout);
#endif /* _SERIAL_H */

Wyświetl plik

@ -3,7 +3,7 @@
* This programs dumps the capabilities of a backend rig.
*
*
* $Id: dumpcaps.c,v 1.1 2000-10-08 21:21:31 f4cfe Exp $
* $Id: dumpcaps.c,v 1.2 2000-10-09 01:17:20 javabear Exp $
*
*
* This program is free software; you can redistribute it and/or
@ -43,7 +43,9 @@ int main (int argc, char *argv[])
exit(1);
}
status = rig_load_backend("icom");
/* status = rig_load_backend("icom"); */
status = rig_load_backend("ft747");
if (status != RIG_OK ) {
printf("rig_load_backend: error = %s \n", rigerror(status));
exit(3);
@ -136,6 +138,9 @@ int main (int argc, char *argv[])
printf("Write delay %dms, timeout %dms, %d retry\n",
caps->write_delay,caps->timeout,caps->retry);
printf("Post Write delay %dms \n",
caps->post_write_delay);
printf("Functions: ");
if (caps->has_func!=0) {

Wyświetl plik

@ -24,13 +24,17 @@ int main ()
* allocate memory, setup & open port
*/
retcode = rig_load_backend("icom");
/* retcode = rig_load_backend("icom"); */
retcode = rig_load_backend("ft747");
if (retcode != RIG_OK ) {
printf("rig_load_backend: error = %s \n", rigerror(retcode));
exit(3);
}
my_rig = rig_init(RIG_MODEL_IC706MKIIG);
/* my_rig = rig_init(RIG_MODEL_IC706MKIIG); */
my_rig = rig_init(RIG_MODEL_FT747);
if (!my_rig)
exit(1); /* whoops! something went wrong (mem alloc?) */
@ -53,7 +57,9 @@ int main ()
* and some error checking on the return code.
*/
retcode = rig_set_vfo(my_rig, RIG_VFO_MAIN);
/* retcode = rig_set_vfo(my_rig, RIG_VFO_MAIN); */
retcode = rig_set_vfo(my_rig, RIG_VFO_B);
if (retcode != RIG_OK ) {
printf("rig_set_vfo: error = %s \n", rigerror(retcode));
@ -65,7 +71,7 @@ int main ()
printf("rig_set_freq: error = %s \n", rigerror(retcode));
}
retcode = rig_set_mode(my_rig, RIG_MODE_FM);
retcode = rig_set_mode(my_rig, RIG_MODE_LSB);
if (retcode != RIG_OK ) {
printf("rig_set_mode: error = %s \n", rigerror(retcode));
@ -118,3 +124,13 @@ int main ()
}