diff --git a/jrc/jrc.c b/jrc/jrc.c index 4a8e7302c..898d86025 100644 --- a/jrc/jrc.c +++ b/jrc/jrc.c @@ -2,7 +2,7 @@ * Hamlib JRC backend - main file * Copyright (c) 2001-2005 by Stephane Fillod * - * $Id: jrc.c,v 1.27 2005-05-01 11:09:38 fineware Exp $ + * $Id: jrc.c,v 1.28 2005-05-04 20:57:52 fineware Exp $ * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as @@ -415,6 +415,11 @@ int jrc_set_func(RIG *rig, vfo_t vfo, setting_t func, int status) return jrc_transaction (rig, cmdbuf, cmd_len, NULL, NULL); + case RIG_FUNC_MN: + cmd_len = sprintf(cmdbuf, "EE%d" EOM, status?1:0); + + return jrc_transaction (rig, cmdbuf, cmd_len, NULL, NULL); + default: rig_debug(RIG_DEBUG_ERR,"Unsupported set_func %d\n", func); return -RIG_EINVAL; @@ -516,6 +521,20 @@ int jrc_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status) return RIG_OK; + case RIG_FUNC_MN: + retval = jrc_transaction (rig, "EE" EOM, 3, funcbuf, &func_len); + if (retval != RIG_OK) + return retval; + + if (func_len != 3) { + rig_debug(RIG_DEBUG_ERR,"jrc_get_func: wrong answer %s, " + "len=%d\n", funcbuf, func_len); + return -RIG_ERJCTED; + } + *status = funcbuf[1] == '1'; + + return RIG_OK; + default: rig_debug(RIG_DEBUG_ERR,"Unsupported get_func %d\n", func); return -RIG_EINVAL; diff --git a/jrc/nrd545.c b/jrc/nrd545.c index 399409761..f16ad62a3 100644 --- a/jrc/nrd545.c +++ b/jrc/nrd545.c @@ -2,7 +2,7 @@ * Hamlib JRC backend - NRD-545 DSP description * Copyright (c) 2001-2004 by Stephane Fillod * - * $Id: nrd545.c,v 1.18 2005-04-20 16:36:00 fillods Exp $ + * $Id: nrd545.c,v 1.19 2005-05-04 20:57:52 fineware Exp $ * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as @@ -33,7 +33,7 @@ #define NRD545_MODES (RIG_MODE_AM|RIG_MODE_CW|RIG_MODE_SSB|RIG_MODE_FM|RIG_MODE_RTTY|RIG_MODE_AMS|RIG_MODE_ECSS) -#define NRD545_FUNC (RIG_FUNC_FAGC|RIG_FUNC_NB|RIG_FUNC_LOCK|RIG_FUNC_BC|RIG_FUNC_NR) +#define NRD545_FUNC (RIG_FUNC_FAGC|RIG_FUNC_NB|RIG_FUNC_LOCK|RIG_FUNC_BC|RIG_FUNC_NR|RIG_FUNC_MN) #define NRD545_LEVEL (RIG_LEVEL_RAWSTR|RIG_LEVEL_STRENGTH|RIG_LEVEL_ATT|RIG_LEVEL_RF|RIG_LEVEL_AF|RIG_LEVEL_AGC|RIG_LEVEL_IF|RIG_LEVEL_NR|RIG_LEVEL_NOTCHF|RIG_LEVEL_SQL|RIG_LEVEL_IF|RIG_LEVEL_CWPITCH) /*RIG_LEVEL_BWC*/