kopia lustrzana https://github.com/Hamlib/Hamlib
Merge remote-tracking branch 'Hamlib/master'
commit
27edb089c7
|
@ -389,8 +389,12 @@ int rig2icom_mode(RIG *rig, rmode_t mode, pbwidth_t width,
|
|||
|
||||
case RIG_MODE_USB: icmode = S_USB; break;
|
||||
|
||||
case RIG_MODE_PKTUSB: icmode = S_USB; break;
|
||||
|
||||
case RIG_MODE_LSB: icmode = S_LSB; break;
|
||||
|
||||
case RIG_MODE_PKTLSB: icmode = S_LSB; break;
|
||||
|
||||
case RIG_MODE_RTTY: icmode = S_RTTY; break;
|
||||
|
||||
case RIG_MODE_RTTYR: icmode = S_RTTYR; break;
|
||||
|
@ -470,9 +474,6 @@ void icom2rig_mode(RIG *rig, unsigned char md, int pd, rmode_t *mode,
|
|||
{
|
||||
*width = RIG_PASSBAND_NORMAL;
|
||||
|
||||
if (md == RIG_MODE_PKTUSB) { md = RIG_MODE_USB; }
|
||||
else if (md == RIG_MODE_PKTLSB) { md = RIG_MODE_LSB; }
|
||||
|
||||
switch (md)
|
||||
{
|
||||
case S_AM: if (rig->caps->rig_model == RIG_MODEL_ICR30 && pd == 0x02)
|
||||
|
|
10
icom/icom.c
10
icom/icom.c
|
@ -1248,11 +1248,11 @@ int icom_set_mode_with_data(RIG *rig, vfo_t vfo, rmode_t mode,
|
|||
}
|
||||
|
||||
if (filter_byte) { // then we need the width byte too
|
||||
rmode_t mode2; // not used as it will map to USB/LSB
|
||||
pbwidth_t width2;
|
||||
icom2rig_mode(rig, mode, width, &mode2, &width2);
|
||||
// since width2 is 0-2 for rigs that need this here we have to make it 1-3
|
||||
datamode[1] = datamode[1] ? width2+1 : 0;
|
||||
unsigned char mode_icom; // not used as it will map to USB/LSB
|
||||
signed char width_icom;
|
||||
rig2icom_mode(rig, mode, width, &mode_icom, &width_icom);
|
||||
// since width_icom is 0-2 for rigs that need this here we have to make it 1-3
|
||||
datamode[1] = datamode[0] ? width_icom : 0;
|
||||
retval =
|
||||
icom_transaction(rig, C_CTL_MEM, dm_sub_cmd, datamode, 2, ackbuf,
|
||||
&ack_len);
|
||||
|
|
|
@ -2447,7 +2447,6 @@ extern HAMLIB_EXPORT(const char *) rig_copyright HAMLIB_PARAMS(());
|
|||
HAMLIB_EXPORT(void) rig_no_restore_ai();
|
||||
|
||||
#include <unistd.h>
|
||||
#include <pthread.h> // so configure can pick up nanosleep on Win32
|
||||
extern HAMLIB_EXPORT(int) hl_usleep(useconds_t msec);
|
||||
|
||||
__END_DECLS
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
#include "hamlib/rig.h"
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
AC_DEFUN([GR_PWIN32],
|
||||
[
|
||||
AC_REQUIRE([AC_HEADER_TIME])
|
||||
AC_SEARCH_LIBS([nanosleep], [pthread], [], [AC_MSG_ERROR([unable to find nanosleep])])
|
||||
AC_CHECK_HEADERS([pthread.h])
|
||||
AC_CHECK_HEADERS([sys/types.h])
|
||||
AC_CHECK_HEADERS([windows.h])
|
||||
AC_CHECK_HEADERS([winioctl.h winbase.h], [], [], [
|
||||
|
@ -33,6 +35,9 @@ AC_CHECK_HEADERS([winioctl.h winbase.h], [], [], [
|
|||
|
||||
AC_CHECK_FUNCS([getopt getopt_long usleep sleep nanosleep gettimeofday])
|
||||
AC_CHECK_TYPES([struct timezone, ssize_t],[],[],[
|
||||
#if HAVE_PTHREAD_H
|
||||
#include <pthread.h>
|
||||
#endif
|
||||
#if HAVE_SYS_TYPES_H
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
BUILD_DIR=~/builds
|
||||
|
||||
# Set this to LibUSB archive extracted in $BUILD_DIR
|
||||
LIBUSB_VER=libusb-1.0.20
|
||||
LIBUSB_VER=libusb-1.0.22
|
||||
|
||||
# uncomment the correct HOST_ARCH= line for your minGW installation
|
||||
HOST_ARCH=i686-w64-mingw32
|
||||
|
@ -225,6 +225,9 @@ cp -a ${LIBUSB_1_0_BIN_PATH}/MinGW32/dll/libusb-1.0.dll ${ZIP_DIR}/bin/libusb-1.
|
|||
cp -a /usr/lib/gcc/i686-w64-mingw32/6.3-posix/libgcc_s_sjlj-1.dll ${ZIP_DIR}/bin/libgcc_s_sjlj-1.dll
|
||||
|
||||
## Need VC++ free toolkit installed (default Wine directory installation shown)
|
||||
( cd ${ZIP_DIR}/lib/msvc/ && wine ~/.wine/drive_c/Program\ Files/Microsoft\ Visual\ C++\ Toolkit\ 2003/bin/link.exe /lib /machine:i386 /def:libhamlib-2.def )
|
||||
# Path for 2003 version of Visual C++ Toolkit
|
||||
#-( cd ${ZIP_DIR}/lib/msvc/ && wine ~/.wine/drive_c/Program\ Files/Microsoft\ Visual\ C++\ Toolkit\ 2003/bin/link.exe /lib /machine:i386 /def:libhamlib-2.def )
|
||||
# Path for Current version of Visual Studio
|
||||
( cd ${ZIP_DIR}/lib/msvc/ && wine ~/.wine/drive_c/Program\ Files\ (x86)\/Microsoft\ Visual\ Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x86/bin/link.exe /lib /machine:i386 /def:libhamlib-2.def )
|
||||
|
||||
/usr/bin/zip -r ${HL_FILENAME}.zip `basename ${ZIP_DIR}`
|
||||
|
|
|
@ -5,7 +5,7 @@ RIGSRC = rig.c serial.c serial.h misc.c misc.h register.c register.h event.c \
|
|||
rot_conf.c rot_conf.h iofunc.c iofunc.h ext.c mem.c settings.c \
|
||||
parallel.c parallel.h usb_port.c usb_port.h debug.c network.c network.h \
|
||||
cm108.c cm108.h gpio.c gpio.h idx_builtin.h token.h par_nt.h microham.c microham.h \
|
||||
amplifier.c amp_reg.c amp_conf.c amp_conf.h extamp.c sleep.c
|
||||
amplifier.c amp_reg.c amp_conf.c amp_conf.h extamp.c sleep.c sleep.h
|
||||
|
||||
lib_LTLIBRARIES = libhamlib.la
|
||||
libhamlib_la_SOURCES = $(RIGSRC)
|
||||
|
|
|
@ -98,6 +98,8 @@ extern HAMLIB_EXPORT(void) rig_force_cache_timeout(struct timeval *tv);
|
|||
|
||||
extern HAMLIB_EXPORT(setting_t) rig_idx2setting(int i);
|
||||
|
||||
extern HAMLIB_EXPORT(int) hl_usleep(useconds_t usec);
|
||||
|
||||
#ifdef PRId64
|
||||
/** \brief printf(3) format to be used for long long (64bits) type */
|
||||
# define PRIll PRId64
|
||||
|
|
|
@ -48,6 +48,7 @@
|
|||
* \example ../tests/testrig.c
|
||||
*/
|
||||
|
||||
#include "hamlib/rig.h"
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
|
|
@ -39,6 +39,8 @@
|
|||
#include <errno.h>
|
||||
#include <time.h>
|
||||
#include <pthread.h>
|
||||
#include "config.h"
|
||||
#include "sleep.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
* Hamlib Interface - sleep header
|
||||
* Copyright (c) 2020 by Michael Black W9MDB
|
||||
*
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _HL_SLEEP_H
|
||||
#define _HL_SLEEP_H 1
|
||||
|
||||
#include <hamlib/rig.h>
|
||||
#include "iofunc.h"
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
/* Hamlib internal use, see rig.c */
|
||||
int hl_usleep(useconds_t usec);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* _HL_SLEEP_H */
|
Ładowanie…
Reference in New Issue