kopia lustrzana https://github.com/Hamlib/Hamlib
cleanups
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@1329 7ae35d74-ebe9-4afe-98af-79ac388436b8Hamlib-1.1.4
rodzic
5c58398c3f
commit
1b5bc5bfb0
|
@ -2,7 +2,7 @@
|
||||||
* Hamlib Kenwood backend - main file
|
* Hamlib Kenwood backend - main file
|
||||||
* Copyright (c) 2000-2002 by Stephane Fillod
|
* Copyright (c) 2000-2002 by Stephane Fillod
|
||||||
*
|
*
|
||||||
* $Id: kenwood.c,v 1.54 2002-12-21 12:35:09 pa4tu Exp $
|
* $Id: kenwood.c,v 1.55 2002-12-21 13:46:05 pa4tu 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
|
||||||
|
@ -684,9 +684,6 @@ int kenwood_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
|
||||||
int i, ret, agclevel;
|
int i, ret, agclevel;
|
||||||
|
|
||||||
lvl_len = 50;
|
lvl_len = 50;
|
||||||
/* Optimize:
|
|
||||||
* sort the switch cases with the most frequent first
|
|
||||||
*/
|
|
||||||
switch (level) {
|
switch (level) {
|
||||||
case RIG_LEVEL_STRENGTH:
|
case RIG_LEVEL_STRENGTH:
|
||||||
retval = kenwood_transaction (rig, "SM;", 3, lvlbuf, &lvl_len);
|
retval = kenwood_transaction (rig, "SM;", 3, lvlbuf, &lvl_len);
|
||||||
|
@ -699,21 +696,11 @@ int kenwood_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
|
||||||
return -RIG_ERJCTED;
|
return -RIG_ERJCTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/* Frontend expects: -54 = S0, 0 = S9 */
|
||||||
* Frontend expects:
|
|
||||||
* -54 = S0
|
|
||||||
* 0 = S9
|
|
||||||
*/
|
|
||||||
sscanf(lvlbuf+2, "%d", &val->i);
|
sscanf(lvlbuf+2, "%d", &val->i);
|
||||||
val->i = (val->i * 4) - 54;
|
val->i = (val->i * 4) - 54;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RIG_LEVEL_SQLSTAT:
|
|
||||||
return -RIG_ENIMPL; /* get_dcd ? */
|
|
||||||
|
|
||||||
case RIG_LEVEL_PREAMP:
|
|
||||||
return -RIG_ENIMPL;
|
|
||||||
|
|
||||||
case RIG_LEVEL_ATT:
|
case RIG_LEVEL_ATT:
|
||||||
retval = kenwood_transaction (rig, "RA;", 3, lvlbuf, &lvl_len);
|
retval = kenwood_transaction (rig, "RA;", 3, lvlbuf, &lvl_len);
|
||||||
if (retval != RIG_OK)
|
if (retval != RIG_OK)
|
||||||
|
@ -764,6 +751,8 @@ int kenwood_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
|
||||||
else if (agclevel <= 255) val->i = 3;
|
else if (agclevel <= 255) val->i = 3;
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
case RIG_LEVEL_SQLSTAT:
|
||||||
|
case RIG_LEVEL_PREAMP:
|
||||||
case RIG_LEVEL_IF:
|
case RIG_LEVEL_IF:
|
||||||
case RIG_LEVEL_APF:
|
case RIG_LEVEL_APF:
|
||||||
case RIG_LEVEL_NR:
|
case RIG_LEVEL_NR:
|
||||||
|
|
Ładowanie…
Reference in New Issue