kopia lustrzana https://github.com/Hamlib/Hamlib
Merge IC-756 Pro III fix from Bill, G4WJS
Merge branch 'fix_icom_ic756p3_data_mode' of git://git.code.sf.net/u/bsomervi/hamlibHamlib-3.0
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;
|
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",
|
rig_debug(RIG_DEBUG_ERR,"%s: wrong frame len=%d\n",
|
||||||
__FUNCTION__, data_len);
|
__FUNCTION__, data_len);
|
||||||
return -RIG_ERJCTED;
|
return -RIG_ERJCTED;
|
||||||
}
|
}
|
||||||
if (0x01 == databuf[1])
|
if (0x01 == databuf[2]) /* 0x01 -> data mode, 0x00 -> not data mode */
|
||||||
{
|
{
|
||||||
switch (*mode)
|
switch (*mode)
|
||||||
{
|
{
|
||||||
|
|
Ładowanie…
Reference in New Issue