mirror of
https://github.com/Hamlib/Hamlib.git
synced 2024-09-22 19:07:22 +00:00
Merge IC-756 Pro III fix from Bill, G4WJS
Merge branch 'fix_icom_ic756p3_data_mode' of git://git.code.sf.net/u/bsomervi/hamlib
This commit is contained in:
commit
ed33efdc2f
13
icom/icom.c
13
icom/icom.c
@ -752,16 +752,23 @@ int icom_get_mode_with_data(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width
|
||||
}
|
||||
|
||||
/*
|
||||
* databuf should contain Cn,Sc
|
||||
* databuf should contain Cn,Sc,D0[,D1]
|
||||
*/
|
||||
data_len -= 2;
|
||||
if (data_len != 1)
|
||||
if (1 > data_len || data_len > 2) /* manual says 1 byte answer
|
||||
but at least IC756 ProIII
|
||||
sends 2 - second byte
|
||||
appears to be same as
|
||||
second byte from 04 command
|
||||
which is filter preset
|
||||
number, whatever it is we
|
||||
ignore it */
|
||||
{
|
||||
rig_debug(RIG_DEBUG_ERR,"%s: wrong frame len=%d\n",
|
||||
__FUNCTION__, data_len);
|
||||
return -RIG_ERJCTED;
|
||||
}
|
||||
if (0x01 == databuf[1])
|
||||
if (0x01 == databuf[2]) /* 0x01 -> data mode, 0x00 -> not data mode */
|
||||
{
|
||||
switch (*mode)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user