kopia lustrzana https://github.com/Hamlib/Hamlib
Merge branch 'master' of https://github.com/mdblack98/Hamlib into mdblack98-master
commit
148f3852e8
|
@ -130,7 +130,6 @@ typedef struct
|
||||||
unsigned char tone_sql[3]; /* tone squelch frequency as tone */
|
unsigned char tone_sql[3]; /* tone squelch frequency as tone */
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
unsigned char pol; /* DTCS polarity by nibbles Tx pol | Rx pol; 0 = normal; 1 = rev */
|
|
||||||
unsigned char code[2]; /* DTCS code bigendian */
|
unsigned char code[2]; /* DTCS code bigendian */
|
||||||
} dcs;
|
} dcs;
|
||||||
} channel_str_t;
|
} channel_str_t;
|
||||||
|
@ -906,7 +905,6 @@ int ic746pro_get_channel(RIG *rig, channel_t *chan)
|
||||||
struct icom_priv_data *priv;
|
struct icom_priv_data *priv;
|
||||||
struct rig_state *rs;
|
struct rig_state *rs;
|
||||||
unsigned char chanbuf[MAXFRAMELEN];
|
unsigned char chanbuf[MAXFRAMELEN];
|
||||||
mem_buf_t *membuf;
|
|
||||||
int chan_len, freq_len, retval, data_len;
|
int chan_len, freq_len, retval, data_len;
|
||||||
|
|
||||||
rs = &rig->state;
|
rs = &rig->state;
|
||||||
|
@ -981,11 +979,12 @@ int ic746pro_get_channel(RIG *rig, channel_t *chan)
|
||||||
int band;
|
int band;
|
||||||
int sc;
|
int sc;
|
||||||
unsigned char databuf[32];
|
unsigned char databuf[32];
|
||||||
|
mem_buf_t *membuf;
|
||||||
|
|
||||||
membuf = (mem_buf_t *)(chanbuf + 4);
|
membuf = (mem_buf_t *)(chanbuf + 4);
|
||||||
|
|
||||||
chan->split = membuf->chan_flag & 0x10 ? RIG_SPLIT_ON : RIG_SPLIT_OFF;
|
chan->split = (membuf->chan_flag & 0x10) ? RIG_SPLIT_ON : RIG_SPLIT_OFF;
|
||||||
chan->flags = membuf->chan_flag & 0x01 ? RIG_CHFLAG_SKIP : RIG_CHFLAG_NONE;
|
chan->flags = (membuf->chan_flag & 0x01) ? RIG_CHFLAG_SKIP : RIG_CHFLAG_NONE;
|
||||||
rig_debug(RIG_DEBUG_TRACE, "%s: chan->flags=0x%02x\n", __func__, chan->flags);
|
rig_debug(RIG_DEBUG_TRACE, "%s: chan->flags=0x%02x\n", __func__, chan->flags);
|
||||||
/* data mode on */
|
/* data mode on */
|
||||||
rig_debug(RIG_DEBUG_TRACE, "%s: membuf->rx.data=0x%02x\n", __func__, membuf->rx.data);
|
rig_debug(RIG_DEBUG_TRACE, "%s: membuf->rx.data=0x%02x\n", __func__, membuf->rx.data);
|
||||||
|
@ -1070,7 +1069,7 @@ int ic746pro_set_channel(RIG *rig, const channel_t *chan)
|
||||||
if (chan->split == RIG_SPLIT_ON)
|
if (chan->split == RIG_SPLIT_ON)
|
||||||
membuf.chan_flag |= 0x10;
|
membuf.chan_flag |= 0x10;
|
||||||
else
|
else
|
||||||
membuf.chan_flag |= chan->flags & RIG_CHFLAG_SKIP ? 0x01 : 0x00;
|
membuf.chan_flag |= (chan->flags & RIG_CHFLAG_SKIP) ? 0x01 : 0x00;
|
||||||
|
|
||||||
// RX
|
// RX
|
||||||
to_bcd(membuf.rx.freq, chan->freq, freq_len * 2);
|
to_bcd(membuf.rx.freq, chan->freq, freq_len * 2);
|
||||||
|
@ -1086,7 +1085,7 @@ int ic746pro_set_channel(RIG *rig, const channel_t *chan)
|
||||||
if(membuf.rx.pb == -1)
|
if(membuf.rx.pb == -1)
|
||||||
membuf.rx.pb = PD_MEDIUM_3;
|
membuf.rx.pb = PD_MEDIUM_3;
|
||||||
|
|
||||||
membuf.rx.data = chan->flags & RIG_CHFLAG_DATA ? 1 : 0;
|
membuf.rx.data = (chan->flags & RIG_CHFLAG_DATA) ? 1 : 0;
|
||||||
membuf.rx.dup = chan->rptr_shift;
|
membuf.rx.dup = chan->rptr_shift;
|
||||||
|
|
||||||
// not empty otherwise the call fail
|
// not empty otherwise the call fail
|
||||||
|
@ -1118,7 +1117,7 @@ int ic746pro_set_channel(RIG *rig, const channel_t *chan)
|
||||||
if(membuf.tx.pb == -1)
|
if(membuf.tx.pb == -1)
|
||||||
membuf.tx.pb = PD_MEDIUM_3;
|
membuf.tx.pb = PD_MEDIUM_3;
|
||||||
|
|
||||||
membuf.tx.data = chan->flags | RIG_CHFLAG_DATA ? 1 : 0;
|
membuf.tx.data = (chan->flags | RIG_CHFLAG_DATA) ? 1 : 0;
|
||||||
membuf.tx.dup = chan->rptr_shift;
|
membuf.tx.dup = chan->rptr_shift;
|
||||||
|
|
||||||
// not empty otherwise the call fail
|
// not empty otherwise the call fail
|
||||||
|
|
|
@ -14,6 +14,6 @@ libhamlib_la_LDFLAGS = $(WINLDFLAGS) $(OSXLDFLAGS) -no-undefined -version-info $
|
||||||
libhamlib_la_LIBADD = $(top_builddir)/lib/libmisc.la \
|
libhamlib_la_LIBADD = $(top_builddir)/lib/libmisc.la \
|
||||||
$(BACKENDEPS) $(RIG_BACKENDEPS) $(ROT_BACKENDEPS) $(AMP_BACKENDEPS) $(NET_LIBS) $(MATH_LIBS) $(LIBUSB_LIBS)
|
$(BACKENDEPS) $(RIG_BACKENDEPS) $(ROT_BACKENDEPS) $(AMP_BACKENDEPS) $(NET_LIBS) $(MATH_LIBS) $(LIBUSB_LIBS)
|
||||||
|
|
||||||
libhamlib_la_DEPENDENCIES = $(top_builddir)/lib/libmisc.la $(BACKENDEPS) $(RIG_BACKEND_DEPS) $(ROT_BACKENDEPS) $(AMP_BACKENDEPS)
|
libhamlib_la_DEPENDENCIES = $(top_builddir)/lib/libmisc.la $(BACKENDEPS) $(RIG_BACKENDEPS) $(ROT_BACKENDEPS) $(AMP_BACKENDEPS)
|
||||||
|
|
||||||
EXTRA_DIST = Android.mk
|
EXTRA_DIST = Android.mk
|
||||||
|
|
|
@ -61,13 +61,14 @@ static FILE *rig_debug_stream;
|
||||||
static vprintf_cb_t rig_vprintf_cb;
|
static vprintf_cb_t rig_vprintf_cb;
|
||||||
static rig_ptr_t rig_vprintf_arg;
|
static rig_ptr_t rig_vprintf_arg;
|
||||||
|
|
||||||
|
extern HAMLIB_EXPORT(void) dump_hex(const unsigned char ptr[], size_t size);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \param ptr Pointer to memory area
|
* \param ptr Pointer to memory area
|
||||||
* \param size Number of chars to words to dump
|
* \param size Number of chars to words to dump
|
||||||
* \brief Do a hex dump of the unsigned char array.
|
* \brief Do a hex dump of the unsigned char array.
|
||||||
*/
|
*/
|
||||||
HAMLIB_EXPORT(void) dump_hex(const unsigned char ptr[], size_t size)
|
void dump_hex(const unsigned char ptr[], size_t size)
|
||||||
{
|
{
|
||||||
/* example
|
/* example
|
||||||
* 0000 4b 30 30 31 34 35 30 30 30 30 30 30 30 35 30 32 K001450000000502
|
* 0000 4b 30 30 31 34 35 30 30 30 30 30 30 30 35 30 32 K001450000000502
|
||||||
|
|
Ładowanie…
Reference in New Issue