kopia lustrzana https://github.com/Hamlib/Hamlib
fix for LEVEL_ATT, reported by lx2gt
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@1180 7ae35d74-ebe9-4afe-98af-79ac388436b8Hamlib-1.1.4
rodzic
cbfbe9d64a
commit
082f8f39ec
|
@ -2,7 +2,7 @@
|
||||||
* Hamlib CI-V backend - main file
|
* Hamlib CI-V backend - main file
|
||||||
* Copyright (c) 2000-2002 by Stephane Fillod
|
* Copyright (c) 2000-2002 by Stephane Fillod
|
||||||
*
|
*
|
||||||
* $Id: icom.c,v 1.65 2002-09-11 21:30:22 fillods Exp $
|
* $Id: icom.c,v 1.66 2002-09-18 21:19:33 fillods Exp $
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or modify
|
* This library is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Library General Public License as
|
* it under the terms of the GNU Library General Public License as
|
||||||
|
@ -636,7 +636,8 @@ int icom_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
|
||||||
break;
|
break;
|
||||||
case RIG_LEVEL_ATT:
|
case RIG_LEVEL_ATT:
|
||||||
lvl_cn = C_CTL_ATT;
|
lvl_cn = C_CTL_ATT;
|
||||||
lvl_sc = val.i;
|
/* attenuator level is dB, in BCD mode */
|
||||||
|
lvl_sc = (val.i/10)<<4 | (val.i%10);
|
||||||
lvl_len = 0;
|
lvl_len = 0;
|
||||||
break;
|
break;
|
||||||
case RIG_LEVEL_AF:
|
case RIG_LEVEL_AF:
|
||||||
|
@ -910,7 +911,7 @@ int icom_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
|
||||||
}
|
}
|
||||||
val->i = rs->preamp[icom_val-1];
|
val->i = rs->preamp[icom_val-1];
|
||||||
break;
|
break;
|
||||||
/* RIG_LEVEL_ATT: returned value is already an integer in dB ! */
|
/* RIG_LEVEL_ATT: returned value is already an integer in dB (coded in BCD) */
|
||||||
default:
|
default:
|
||||||
if (RIG_LEVEL_IS_FLOAT(level))
|
if (RIG_LEVEL_IS_FLOAT(level))
|
||||||
val->f = (float)icom_val/255;
|
val->f = (float)icom_val/255;
|
||||||
|
@ -918,7 +919,7 @@ int icom_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
|
||||||
val->i = icom_val;
|
val->i = icom_val;
|
||||||
}
|
}
|
||||||
|
|
||||||
rig_debug(RIG_DEBUG_VERBOSE,"get_level: %d %d %d %f\n", lvl_len,
|
rig_debug(RIG_DEBUG_TRACE,"icom_get_level: %d %d %d %f\n", lvl_len,
|
||||||
icom_val, val->i, val->f);
|
icom_val, val->i, val->f);
|
||||||
|
|
||||||
return RIG_OK;
|
return RIG_OK;
|
||||||
|
|
Ładowanie…
Reference in New Issue