kopia lustrzana https://github.com/Hamlib/Hamlib
Update LGPL header in AOR source files.
TNX to Lucian Laga, YO6PLB, for the notification.Hamlib-1.2.15
rodzic
c852398289
commit
b5e4c4e853
86
aor/aor.c
86
aor/aor.c
|
@ -3,19 +3,19 @@
|
|||
* Copyright (c) 2000-2010 by Stephane Fillod
|
||||
*
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -104,7 +104,7 @@ static int aor_transaction(RIG *rig, const char *cmd, int cmd_len, char *data, i
|
|||
}
|
||||
|
||||
*data_len = retval;
|
||||
|
||||
|
||||
if (*data_len < BUFSZ)
|
||||
data[*data_len] = '\0';
|
||||
else
|
||||
|
@ -141,7 +141,7 @@ static int format_freq(char *buf, freq_t freq)
|
|||
int64_t f = (int64_t)freq;
|
||||
|
||||
/*
|
||||
* actually, frequency must be like nnnnnnnnm0,
|
||||
* actually, frequency must be like nnnnnnnnm0,
|
||||
* where m must be 0 or 5 (for 50Hz).
|
||||
*/
|
||||
lowhz = f % 100;
|
||||
|
@ -150,7 +150,7 @@ static int format_freq(char *buf, freq_t freq)
|
|||
lowhz = 0;
|
||||
else if (lowhz < 75)
|
||||
lowhz = 50;
|
||||
else
|
||||
else
|
||||
lowhz = 100;
|
||||
f = f*100 + lowhz;
|
||||
|
||||
|
@ -298,7 +298,7 @@ int format8k_mode(RIG *rig, char *buf, rmode_t mode, pbwidth_t width)
|
|||
int aormode;
|
||||
|
||||
switch (mode) {
|
||||
case RIG_MODE_AM:
|
||||
case RIG_MODE_AM:
|
||||
if (rig->caps->rig_model == RIG_MODEL_AR8000)
|
||||
{
|
||||
aormode = AR8K_AM;
|
||||
|
@ -391,7 +391,7 @@ int aor_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
|
|||
default:
|
||||
retval = aor_transaction (rig, mdbuf, mdbuf_len, NULL, NULL);
|
||||
}
|
||||
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
@ -404,22 +404,22 @@ int parse8k_aor_mode(RIG *rig, char aormode, char aorwidth, rmode_t *mode, pbwid
|
|||
*width = RIG_PASSBAND_NORMAL;
|
||||
switch (aormode) {
|
||||
case AR8K_AM: *mode = RIG_MODE_AM; break;
|
||||
case AR8K_NAM:
|
||||
case AR8K_NAM:
|
||||
*mode = RIG_MODE_AM;
|
||||
*width = rig_passband_narrow(rig, *mode);
|
||||
*width = rig_passband_narrow(rig, *mode);
|
||||
break;
|
||||
case AR8K_WAM:
|
||||
case AR8K_WAM:
|
||||
*mode = RIG_MODE_AM;
|
||||
*width = rig_passband_wide(rig, *mode);
|
||||
*width = rig_passband_wide(rig, *mode);
|
||||
break;
|
||||
case AR8K_CW: *mode = RIG_MODE_CW; break;
|
||||
case AR8K_USB: *mode = RIG_MODE_USB; break;
|
||||
case AR8K_LSB: *mode = RIG_MODE_LSB; break;
|
||||
case AR8K_WFM: *mode = RIG_MODE_WFM; break;
|
||||
case AR8K_NFM: *mode = RIG_MODE_FM; break;
|
||||
case AR8K_SFM:
|
||||
case AR8K_SFM:
|
||||
*mode = RIG_MODE_FM;
|
||||
*width = rig_passband_narrow(rig, *mode);
|
||||
*width = rig_passband_narrow(rig, *mode);
|
||||
break;
|
||||
default:
|
||||
rig_debug(RIG_DEBUG_ERR,"%s: unsupported mode '%c'\n",
|
||||
|
@ -450,7 +450,7 @@ int aor_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
|
|||
return retval;
|
||||
|
||||
/*
|
||||
* search MD, because on the AR5000, AU is also returned
|
||||
* search MD, because on the AR5000, AU is also returned
|
||||
* by MD request
|
||||
*/
|
||||
mdp = strstr(ackbuf, "MD");
|
||||
|
@ -485,7 +485,7 @@ int aor_set_ts(RIG *rig, vfo_t vfo, shortfreq_t ts)
|
|||
int ts_len;
|
||||
|
||||
/*
|
||||
* actually, tuning step must be like nnnnm0,
|
||||
* actually, tuning step must be like nnnnm0,
|
||||
* where m must be 0 or 5 (for 50Hz).
|
||||
*/
|
||||
ts_len = sprintf(tsbuf,"ST%06ld" EOM, ts);
|
||||
|
@ -767,9 +767,9 @@ int aor_set_mem(RIG *rig, vfo_t vfo, int ch)
|
|||
mem_num -= 50;
|
||||
} else {
|
||||
bank_base = priv->bank_base1;
|
||||
}
|
||||
}
|
||||
|
||||
mem_len = sprintf(membuf,"MR%c%02d" EOM,
|
||||
mem_len = sprintf(membuf,"MR%c%02d" EOM,
|
||||
bank_base + ch/100, mem_num);
|
||||
|
||||
return aor_transaction (rig, membuf, mem_len, NULL, NULL);
|
||||
|
@ -817,7 +817,7 @@ int aor_set_bank(RIG *rig, vfo_t vfo, int bank)
|
|||
char membuf[BUFSZ];
|
||||
int mem_len;
|
||||
|
||||
mem_len = sprintf(membuf,"MR%c" EOM, (bank%10) + (bank<10 ?
|
||||
mem_len = sprintf(membuf,"MR%c" EOM, (bank%10) + (bank<10 ?
|
||||
priv->bank_base1:priv->bank_base2));
|
||||
|
||||
return aor_transaction (rig, membuf, mem_len, NULL, NULL);
|
||||
|
@ -830,7 +830,7 @@ int aor_set_channel(RIG *rig, const channel_t *chan)
|
|||
char aorcmd[BUFSZ];
|
||||
int cmd_len;
|
||||
|
||||
cmd_len = sprintf(aorcmd, "MX%c%02d ",
|
||||
cmd_len = sprintf(aorcmd, "MX%c%02d ",
|
||||
chan->bank_num, chan->channel_num%100);
|
||||
|
||||
cmd_len += format_freq(aorcmd+cmd_len, chan->freq);
|
||||
|
@ -838,12 +838,12 @@ int aor_set_channel(RIG *rig, const channel_t *chan)
|
|||
/*
|
||||
* FIXME: automode
|
||||
*/
|
||||
cmd_len += sprintf(aorcmd+cmd_len, " AU%d ST%06d ",
|
||||
cmd_len += sprintf(aorcmd+cmd_len, " AU%d ST%06d ",
|
||||
0, (int)chan->tuning_step);
|
||||
|
||||
cmd_len += priv->format_mode(rig, aorcmd+cmd_len, chan->mode, chan->width);
|
||||
|
||||
cmd_len += sprintf(aorcmd+cmd_len, " AT%d TM%12s"EOM,
|
||||
cmd_len += sprintf(aorcmd+cmd_len, " AT%d TM%12s"EOM,
|
||||
chan->levels[LVL_ATT].i ? 1:0, chan->channel_desc);
|
||||
|
||||
return aor_transaction (rig, aorcmd, cmd_len, NULL, NULL);
|
||||
|
@ -856,7 +856,7 @@ static int parse_chan_line(RIG *rig, channel_t *chan, char *basep, const channel
|
|||
char *tagp;
|
||||
int ts;
|
||||
|
||||
/*
|
||||
/*
|
||||
* search for attribute tags in the line.
|
||||
* Using strstr enable support for various models
|
||||
* which may or may not have tag support.
|
||||
|
@ -1029,8 +1029,8 @@ int aor_get_channel(RIG *rig, channel_t *chan)
|
|||
}
|
||||
if (!mem_caps)
|
||||
return -RIG_EINVAL;
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* FIXME: we're assuming the banks are split 50/50.
|
||||
* MW should be called the first time instead,
|
||||
|
@ -1042,18 +1042,18 @@ int aor_get_channel(RIG *rig, channel_t *chan)
|
|||
mem_num -= 50;
|
||||
} else {
|
||||
bank_base = priv->bank_base1;
|
||||
}
|
||||
|
||||
cmd_len = sprintf(aorcmd, "MR%c%02d" EOM,
|
||||
}
|
||||
|
||||
cmd_len = sprintf(aorcmd, "MR%c%02d" EOM,
|
||||
bank_base + channel_num/100, mem_num);
|
||||
retval = aor_transaction (rig, aorcmd, cmd_len, chanbuf, &chan_len);
|
||||
|
||||
|
||||
/* is the channel empty? */
|
||||
if (retval == -RIG_EPROTO && chanbuf[0] == '?') {
|
||||
chan->freq = RIG_FREQ_NONE;
|
||||
return -RIG_ENAVAIL;
|
||||
}
|
||||
|
||||
|
||||
if (retval != RIG_OK)
|
||||
return retval;
|
||||
}
|
||||
|
@ -1098,31 +1098,31 @@ int aor_get_chan_all_cb (RIG * rig, chan_cb_t chan_cb, rig_ptr_t arg)
|
|||
if (chan == NULL)
|
||||
return -RIG_ENOMEM;
|
||||
|
||||
cmd_len = sprintf(aorcmd, "MA%c" EOM,
|
||||
cmd_len = sprintf(aorcmd, "MA%c" EOM,
|
||||
priv->bank_base1);
|
||||
|
||||
|
||||
for (i=0; i < chan_count/LINES_PER_MA; i++) {
|
||||
|
||||
retval = aor_transaction (rig, aorcmd, cmd_len, chanbuf, &chan_len);
|
||||
if (retval != RIG_OK)
|
||||
return retval;
|
||||
|
||||
|
||||
for (j=0; j<LINES_PER_MA; j++) {
|
||||
|
||||
chan->vfo = RIG_VFO_MEM;
|
||||
chan->channel_num = i*LINES_PER_MA + j;
|
||||
|
||||
retval = parse_chan_line(rig, chan, chanbuf, &chan_list[0].mem_caps);
|
||||
|
||||
|
||||
if (retval == -RIG_ENAVAIL)
|
||||
retval = RIG_OK;
|
||||
|
||||
if (retval != RIG_OK)
|
||||
return retval;
|
||||
|
||||
|
||||
/* notify the end? */
|
||||
chan_next = chan_next < chan_list[i].end ? chan_next+1 : chan_next;
|
||||
|
||||
|
||||
/*
|
||||
* provide application with channel data,
|
||||
* and ask for a new channel structure
|
||||
|
@ -1168,7 +1168,7 @@ const char *aor_get_info(RIG *rig)
|
|||
return NULL;
|
||||
|
||||
frmbuf[frm_len] = '\0';
|
||||
sprintf(infobuf, "Remote ID %c%c, Firmware version %s",
|
||||
sprintf(infobuf, "Remote ID %c%c, Firmware version %s",
|
||||
idbuf[0], idbuf[1], frmbuf);
|
||||
|
||||
return infobuf;
|
||||
|
|
18
aor/aor.h
18
aor/aor.h
|
@ -3,19 +3,19 @@
|
|||
* Copyright (c) 2000-2010 by Stephane Fillod
|
||||
*
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
21
aor/ar2700.c
21
aor/ar2700.c
|
@ -2,21 +2,20 @@
|
|||
* Hamlib AOR backend - AR2700 description
|
||||
* Copyright (c) 2000-2008 by Stephane Fillod
|
||||
*
|
||||
* $Id: ar2700.c,v 1.2 2008-04-11 17:10:45 fillods 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
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -157,7 +156,7 @@ const struct rig_caps ar2700_caps = {
|
|||
.filters = {
|
||||
/* mode/filter list, .remember = order matters! */
|
||||
{RIG_MODE_AM, kHz(9)},
|
||||
{RIG_MODE_FM, kHz(12)},
|
||||
{RIG_MODE_FM, kHz(12)},
|
||||
{RIG_MODE_WFM, kHz(230)},
|
||||
RIG_FLT_END,
|
||||
},
|
||||
|
|
33
aor/ar3000.c
33
aor/ar3000.c
|
@ -2,21 +2,20 @@
|
|||
* Hamlib AOR backend - AR3000 description
|
||||
* Copyright (c) 2000-2005 by Stephane Fillod
|
||||
*
|
||||
* $Id: ar3000.c,v 1.10 2006-10-07 21:10:11 csete 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
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -129,7 +128,7 @@ const struct rig_caps ar3000a_caps = {
|
|||
.tuning_steps = {
|
||||
{AR3000A_MODES,50},
|
||||
{AR3000A_MODES,kHz(999.95)},
|
||||
#if 0
|
||||
#if 0
|
||||
{AR3000A_MODES,0}, /* any tuning step */
|
||||
#endif
|
||||
RIG_TS_END,
|
||||
|
@ -137,8 +136,8 @@ const struct rig_caps ar3000a_caps = {
|
|||
/* mode/filter list, .remember = order matters! */
|
||||
.filters = {
|
||||
/* mode/filter list, .remember = order matters! */
|
||||
{RIG_MODE_SSB|RIG_MODE_CW, kHz(2.4)},
|
||||
{RIG_MODE_FM|RIG_MODE_AM, kHz(12)},
|
||||
{RIG_MODE_SSB|RIG_MODE_CW, kHz(2.4)},
|
||||
{RIG_MODE_FM|RIG_MODE_AM, kHz(12)},
|
||||
{RIG_MODE_WFM, kHz(180)},
|
||||
RIG_FLT_END,
|
||||
},
|
||||
|
@ -227,7 +226,7 @@ int ar3k_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
|
|||
unsigned lowhz;
|
||||
|
||||
/*
|
||||
* actually, frequency must be like nnnn.nnnnm,
|
||||
* actually, frequency must be like nnnn.nnnnm,
|
||||
* where m must be 0 or 5 (for 50Hz).
|
||||
*/
|
||||
lowhz = ((unsigned)freq) % 100;
|
||||
|
@ -236,7 +235,7 @@ int ar3k_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
|
|||
lowhz = 0;
|
||||
else if (lowhz < 75)
|
||||
lowhz = 50;
|
||||
else
|
||||
else
|
||||
lowhz = 100;
|
||||
freq = freq*100 + lowhz;
|
||||
|
||||
|
@ -355,7 +354,7 @@ int ar3k_set_ts(RIG *rig, vfo_t vfo, shortfreq_t ts)
|
|||
int lowhz;
|
||||
|
||||
/*
|
||||
* actually, frequency must be like nnn.nm,
|
||||
* actually, frequency must be like nnn.nm,
|
||||
* where m must be 0 or 5 (for 50Hz).
|
||||
*/
|
||||
lowhz = ts % 100;
|
||||
|
@ -364,7 +363,7 @@ int ar3k_set_ts(RIG *rig, vfo_t vfo, shortfreq_t ts)
|
|||
lowhz = 0;
|
||||
else if (lowhz < 75)
|
||||
lowhz = 50;
|
||||
else
|
||||
else
|
||||
lowhz = 100;
|
||||
ts = ts*100 + lowhz;
|
||||
|
||||
|
|
35
aor/ar3030.c
35
aor/ar3030.c
|
@ -2,21 +2,20 @@
|
|||
* Hamlib AOR backend - AR3030 description
|
||||
* Copyright (c) 2000-2005 by Stephane Fillod
|
||||
*
|
||||
* $Id: ar3030.c,v 1.10 2006-10-07 21:10:11 csete 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
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -56,7 +55,7 @@ struct ar3030_priv_data {
|
|||
int curr_vfo;
|
||||
};
|
||||
|
||||
/*
|
||||
/*
|
||||
* TODO:
|
||||
* set_channel(emulated?),rig_vfo_op
|
||||
* rig_reset(RIG_RESET_MCALL)
|
||||
|
@ -139,7 +138,7 @@ const struct rig_caps ar3030_caps = {
|
|||
.vfo_ops = AR3030_VFO_OPS,
|
||||
.str_cal = AR3030_STR_CAL,
|
||||
|
||||
.chan_list = {
|
||||
.chan_list = {
|
||||
{ 0, 99, RIG_MTYPE_MEM, AR3030_MEM_CAP },
|
||||
RIG_CHAN_END, },
|
||||
|
||||
|
@ -164,8 +163,8 @@ const struct rig_caps ar3030_caps = {
|
|||
},
|
||||
/* mode/filter list, .remember = order matters! */
|
||||
.filters = {
|
||||
{RIG_MODE_AM, kHz(6)},
|
||||
{RIG_MODE_SSB|RIG_MODE_CW|RIG_MODE_AM, kHz(2.4)},
|
||||
{RIG_MODE_AM, kHz(6)},
|
||||
{RIG_MODE_SSB|RIG_MODE_CW|RIG_MODE_AM, kHz(2.4)},
|
||||
{RIG_MODE_CW, 500},
|
||||
{RIG_MODE_FM, kHz(15)},
|
||||
RIG_FLT_END,
|
||||
|
@ -341,7 +340,7 @@ int ar3030_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
|
|||
char freqbuf[BUFSZ];
|
||||
|
||||
/*
|
||||
* D Rn Gn Bn Tn Fnnnnnnnn C
|
||||
* D Rn Gn Bn Tn Fnnnnnnnn C
|
||||
* Note: spaces are transmitted.
|
||||
*/
|
||||
retval = ar3030_transaction (rig, "D" EOM, 3, freqbuf, &freq_len);
|
||||
|
@ -422,7 +421,7 @@ int ar3030_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
|
|||
return -RIG_EPROTO;
|
||||
}
|
||||
|
||||
*width = buf[9] == '1' ? rig_passband_narrow(rig, *mode) :
|
||||
*width = buf[9] == '1' ? rig_passband_narrow(rig, *mode) :
|
||||
rig_passband_normal(rig, *mode);
|
||||
|
||||
return RIG_OK;
|
||||
|
@ -493,7 +492,7 @@ int ar3030_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
|
|||
cmd = val.i == RIG_AGC_FAST ? "1G" EOM : "0G" EOM;
|
||||
break;
|
||||
case RIG_LEVEL_ATT:
|
||||
cmd = val.i == 0 ? "0R" EOM :
|
||||
cmd = val.i == 0 ? "0R" EOM :
|
||||
(val.i == 1 ? "1R" EOM : "2R" EOM);
|
||||
break;
|
||||
default:
|
||||
|
@ -608,7 +607,7 @@ int ar3030_get_channel(RIG *rig, channel_t *chan)
|
|||
}
|
||||
|
||||
chan->width = infobuf[10] == '1' ?
|
||||
rig_passband_narrow(rig, chan->mode) :
|
||||
rig_passband_narrow(rig, chan->mode) :
|
||||
rig_passband_normal(rig, chan->mode);
|
||||
|
||||
|
||||
|
|
35
aor/ar5000.c
35
aor/ar5000.c
|
@ -1,23 +1,22 @@
|
|||
/*
|
||||
* Hamlib AOR backend - AR5000 description
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2000-2008 by Stephane Fillod
|
||||
*
|
||||
* $Id: ar5000.c,v 1.12 2008-04-11 17:10:45 fillods 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
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -46,7 +45,7 @@
|
|||
#define AR5000_VFO (RIG_VFO_A | RIG_VFO_B | RIG_VFO_C | RIG_VFO_N(3) | RIG_VFO_N(4))
|
||||
|
||||
/* As reported with rigctl 'l RAWSTR' for AR5000A S/n: 171218
|
||||
on 7040kHz / CW / 3kHz Bw.
|
||||
on 7040kHz / CW / 3kHz Bw.
|
||||
|
||||
The data available on http://www.aoruk.com did not match very well on HF */
|
||||
#define AR5000_STR_CAL { 16, { \
|
||||
|
@ -181,16 +180,16 @@ const struct rig_caps ar5000_caps = {
|
|||
{AR5000_MODES,kHz(50)},
|
||||
{AR5000_MODES,kHz(100)},
|
||||
{AR5000_MODES,kHz(500)},
|
||||
#if 0
|
||||
#if 0
|
||||
{AR5000_MODES,0}, /* any tuning step */
|
||||
#endif
|
||||
RIG_TS_END,
|
||||
},
|
||||
/* mode/filter list, .remember = order matters! */
|
||||
.filters = {
|
||||
{RIG_MODE_SSB|RIG_MODE_SAL|RIG_MODE_SAH|RIG_MODE_CW, kHz(3)},
|
||||
{RIG_MODE_SSB|RIG_MODE_SAL|RIG_MODE_SAH|RIG_MODE_CW, kHz(3)},
|
||||
{RIG_MODE_CW, Hz(500)}, /* narrow */
|
||||
{RIG_MODE_AM|RIG_MODE_SAM, kHz(6)},
|
||||
{RIG_MODE_AM|RIG_MODE_SAM, kHz(6)},
|
||||
{RIG_MODE_AM|RIG_MODE_SAM, kHz(3)}, /* narrow */
|
||||
{RIG_MODE_AM|RIG_MODE_FM|RIG_MODE_SAM, kHz(15)},
|
||||
{RIG_MODE_FM, kHz(6)}, /* narrow */
|
||||
|
@ -323,16 +322,16 @@ const struct rig_caps ar5000a_caps = {
|
|||
{AR5000_MODES,kHz(50)},
|
||||
{AR5000_MODES,kHz(100)},
|
||||
{AR5000_MODES,kHz(500)},
|
||||
#if 0
|
||||
#if 0
|
||||
{AR5000_MODES,0}, /* any tuning step */
|
||||
#endif
|
||||
RIG_TS_END,
|
||||
},
|
||||
/* mode/filter list, .remember = order matters! */
|
||||
.filters = {
|
||||
{RIG_MODE_SSB|RIG_MODE_SAL|RIG_MODE_SAH|RIG_MODE_CW, kHz(3)},
|
||||
{RIG_MODE_SSB|RIG_MODE_SAL|RIG_MODE_SAH|RIG_MODE_CW, kHz(3)},
|
||||
{RIG_MODE_CW, Hz(500)}, /* narrow */
|
||||
{RIG_MODE_AM|RIG_MODE_SAM, kHz(6)},
|
||||
{RIG_MODE_AM|RIG_MODE_SAM, kHz(6)},
|
||||
{RIG_MODE_AM|RIG_MODE_SAM, kHz(3)}, /* narrow */
|
||||
{RIG_MODE_AM|RIG_MODE_FM|RIG_MODE_SAM, kHz(15)},
|
||||
{RIG_MODE_FM, kHz(6)}, /* narrow */
|
||||
|
|
279
aor/ar7030.c
279
aor/ar7030.c
|
@ -2,21 +2,20 @@
|
|||
* Hamlib AOR backend - AR7030 description
|
||||
* Copyright (c) 2000-2006 by Stephane Fillod & Fritz Melchert
|
||||
*
|
||||
* $Id: ar7030.c,v 1.7 2006-10-07 21:10:11 csete 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
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -24,7 +23,7 @@
|
|||
// Version 2004.12.13 F.Melchert (DC9RP)
|
||||
// Version 2004.11.29 F.Melchert (DC9RP)
|
||||
//
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
@ -39,7 +38,7 @@
|
|||
#include "idx_builtin.h"
|
||||
|
||||
|
||||
/*
|
||||
/*
|
||||
* Maintainer wanted!
|
||||
*
|
||||
* TODO:
|
||||
|
@ -129,7 +128,7 @@ static void setLock(RIG *rig, int level)
|
|||
}
|
||||
}
|
||||
|
||||
// Level 2 = 0x82 As level 1, but display update suspended. In revisions before 1.4
|
||||
// Level 2 = 0x82 As level 1, but display update suspended. In revisions before 1.4
|
||||
// squelch operation is inhibited, which results in no audio output
|
||||
// after a mode change. In revision 1.4 squelch operation continues
|
||||
// and mode changing is as expected.
|
||||
|
@ -137,7 +136,7 @@ static void setLock(RIG *rig, int level)
|
|||
|
||||
|
||||
|
||||
static void setMemPtr(RIG *rig, int page, int address)
|
||||
static void setMemPtr(RIG *rig, int page, int address)
|
||||
{
|
||||
rxr_writeByte(rig, 0x50 + page); //Set Page
|
||||
if (address <= 0xFF) { //*** <= 8 Bit Adresse ***
|
||||
|
@ -154,19 +153,19 @@ static void setMemPtr(RIG *rig, int page, int address)
|
|||
* Routines *
|
||||
****************************************************************************/
|
||||
// Routine 0 Reset Setup receiver as at switch-on.
|
||||
static void Execute_Routine_0(RIG *rig)
|
||||
static void Execute_Routine_0(RIG *rig)
|
||||
{
|
||||
//setLock(rig, 1); //Set Lock Level
|
||||
rxr_writeByte(rig, 0x20);
|
||||
//unlock(rig); //Set UnLock Level
|
||||
}
|
||||
// Routine 1 Set frequency Program local oscillator from frequ area and setup
|
||||
// Routine 1 Set frequency Program local oscillator from frequ area and setup
|
||||
// RF filters and oscillator range.
|
||||
// Routine 2 Set mode Setup from mode byte in memory and display mode,
|
||||
// Routine 2 Set mode Setup from mode byte in memory and display mode,
|
||||
// select preferred filter and PBS, BFO values etc.
|
||||
// currently not used
|
||||
#if 0
|
||||
static void Execute_Routine_2_1(RIG *rig, char mp , char ad , int numSteps)
|
||||
static void Execute_Routine_2_1(RIG *rig, char mp , char ad , int numSteps)
|
||||
{
|
||||
setLock(rig, 1); //Set Lock Level
|
||||
setMemPtr(rig, mp , ad ); //page, address
|
||||
|
@ -177,7 +176,7 @@ static void Execute_Routine_2_1(RIG *rig, char mp , char ad , int numSteps)
|
|||
}
|
||||
#endif
|
||||
// Routine 3 Set passband Setup all IF parameters from filter, pbsval and bfoval bytes.
|
||||
static void Execute_Routine_3_1(RIG *rig, char mp , char ad , int numSteps)
|
||||
static void Execute_Routine_3_1(RIG *rig, char mp , char ad , int numSteps)
|
||||
{
|
||||
setLock(rig, 1); //Set Lock Level
|
||||
setMemPtr(rig, mp , ad ); //page, address
|
||||
|
@ -187,28 +186,28 @@ static void Execute_Routine_3_1(RIG *rig, char mp , char ad , int numSteps)
|
|||
unlock(rig); //Set UnLock Level
|
||||
}
|
||||
// Routine 4 Set all Set all receiver parameters from current memory values
|
||||
static void Execute_Routine_4_1(RIG *rig, char mp , char ad , int numSteps)
|
||||
static void Execute_Routine_4_1(RIG *rig, char mp , char ad , int numSteps)
|
||||
{
|
||||
setLock(rig, 1); //Set Lock Level
|
||||
setMemPtr(rig, mp , ad ); //page, address
|
||||
// 0x30 = Set H-register x ---> H-register (4-bits)
|
||||
// The high order 4-bits of each byte sent to the receiver is the operation code,
|
||||
// the low order 4-bits is data (shown here as x)
|
||||
// The high order 4-bits of each byte sent to the receiver is the operation code,
|
||||
// the low order 4-bits is data (shown here as x)
|
||||
rxr_writeByte(rig, 0x30 | (0x0F & (char)(numSteps>>4)));
|
||||
// 0x60 = Write data Hx
|
||||
// ---> [Page, Address] Address register + 1
|
||||
// ---> Address register 0
|
||||
// ---> H-register, 0
|
||||
// 0x60 = Write data Hx
|
||||
// ---> [Page, Address] Address register + 1
|
||||
// ---> Address register 0
|
||||
// ---> H-register, 0
|
||||
// ---> Mask register
|
||||
rxr_writeByte(rig, 0x60 | (0x0F & (char)(numSteps)));
|
||||
|
||||
//Execute routine
|
||||
//Set all Set all receiver parameters from current memory values
|
||||
//Execute routine
|
||||
//Set all Set all receiver parameters from current memory values
|
||||
rxr_writeByte(rig, 0x24);
|
||||
unlock(rig); //Set UnLock Level
|
||||
}
|
||||
|
||||
static void Execute_Routine_4_3(RIG *rig, char mp , char ad , int numSteps)
|
||||
static void Execute_Routine_4_3(RIG *rig, char mp , char ad , int numSteps)
|
||||
{
|
||||
setLock(rig, 1); //Set Lock Level
|
||||
setMemPtr(rig, mp , ad ); //page, address
|
||||
|
@ -219,8 +218,8 @@ static void Execute_Routine_4_3(RIG *rig, char mp , char ad , int numSteps)
|
|||
rxr_writeByte(rig, 0x30 | (0x0F & (char)(numSteps>>4)));
|
||||
rxr_writeByte(rig, 0x60 | (0x0F & (char)(numSteps)));
|
||||
|
||||
//Execute routine
|
||||
//Set all Set all receiver parameters from current memory values
|
||||
//Execute routine
|
||||
//Set all Set all receiver parameters from current memory values
|
||||
rxr_writeByte(rig, 0x24);
|
||||
unlock(rig); //Set UnLock Level
|
||||
}
|
||||
|
@ -228,7 +227,7 @@ static void Execute_Routine_4_3(RIG *rig, char mp , char ad , int numSteps)
|
|||
// Routine 5 Set audio Setup audio controller from memory register values.
|
||||
// currently not used
|
||||
#if 0
|
||||
static void Execute_Routine_5_1(RIG *rig, char mp , char ad , int numSteps)
|
||||
static void Execute_Routine_5_1(RIG *rig, char mp , char ad , int numSteps)
|
||||
{
|
||||
setLock(rig, 1); //Set Lock Level
|
||||
setMemPtr(rig, mp , ad ); //page, address
|
||||
|
@ -239,9 +238,9 @@ static void Execute_Routine_5_1(RIG *rig, char mp , char ad , int numSteps)
|
|||
}
|
||||
#endif
|
||||
|
||||
// Routine 6 Set RF-IF Setup RF Gain, IF Gain and AGC speed. Also sets Notch Filter and
|
||||
// Routine 6 Set RF-IF Setup RF Gain, IF Gain and AGC speed. Also sets Notch Filter and
|
||||
// Noise Blanker if these options are fitted.
|
||||
static void Execute_Routine_6_1(RIG *rig, char mp , char ad , int numSteps)
|
||||
static void Execute_Routine_6_1(RIG *rig, char mp , char ad , int numSteps)
|
||||
{
|
||||
setLock(rig, 1); //Set Lock Level
|
||||
setMemPtr(rig, mp , ad ); //page, address
|
||||
|
@ -250,8 +249,8 @@ static void Execute_Routine_6_1(RIG *rig, char mp , char ad , int numSteps)
|
|||
rxr_writeByte(rig, 0x26);
|
||||
unlock(rig); //Set UnLock Level
|
||||
}
|
||||
// Routine 14 Read signal strength
|
||||
// Transmits byte representing received signal strength (read from AGC voltage).
|
||||
// Routine 14 Read signal strength
|
||||
// Transmits byte representing received signal strength (read from AGC voltage).
|
||||
// Output is 8-bit binary in range 0 to 255.
|
||||
static int Execute_Routine_14(RIG *rig)
|
||||
{
|
||||
|
@ -270,7 +269,7 @@ static int Execute_Routine_14(RIG *rig)
|
|||
// 2 = Mode down button 7 = * button
|
||||
// 3 = Fast button 8 = Menu button
|
||||
// 4 = Filter button 9 = Power button
|
||||
static void Execute_Operate_button(RIG *rig, char button)
|
||||
static void Execute_Operate_button(RIG *rig, char button)
|
||||
{
|
||||
// setLock(rig, 1); //Set Lock Level
|
||||
rxr_writeByte(rig, 0xa0 | (0x0F & button));
|
||||
|
@ -279,7 +278,7 @@ static void Execute_Operate_button(RIG *rig, char button)
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
static int ar7030_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
|
||||
{
|
||||
// frequ Mem_Page=0 Address=1A
|
||||
|
@ -301,28 +300,28 @@ static int ar7030_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
|
|||
frequ_i = frequ_i + (int)(rxr_readByte(rig));
|
||||
*freq = ((float)(frequ_i) * 2.65508890157896);
|
||||
return RIG_OK;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
Current mode :-
|
||||
RIG_MODE_NONE = 0, < None
|
||||
1 = AM RIG_MODE_AM = (1<<0), < Amplitude Modulation
|
||||
5 = CW RIG_MODE_CW = (1<<1), < CW
|
||||
7 = USB RIG_MODE_USB = (1<<2), < Upper Side Band
|
||||
6 = LSB RIG_MODE_LSB = (1<<3), < Lower Side Band
|
||||
4 = Data RIG_MODE_RTTY = (1<<4), < Remote Teletype
|
||||
3 = NFM RIG_MODE_FM = (1<<5), < "narrow" band FM
|
||||
RIG_MODE_WFM = (1<<6), < broadcast wide FM
|
||||
RIG_MODE_CWR = (1<<7), < CW reverse sideband
|
||||
RIG_MODE_RTTYR = (1<<8), < RTTY reverse sideband
|
||||
2 = Sync RIG_MODE_AMS = (1<<9), < Amplitude Modulation Synchronous
|
||||
RIG_MODE_PKTLSB = (1<<10),< Packet/Digital LSB mode (dedicated port)
|
||||
RIG_MODE_PKTUSB = (1<<11),< Packet/Digital USB mode (dedicated port)
|
||||
RIG_MODE_PKTFM = (1<<12),< Packet/Digital FM mode (dedicated port)
|
||||
RIG_MODE_ECSSUSB = (1<<13),< Exalted Carrier Single Sideband USB
|
||||
RIG_MODE_ECSSLSB = (1<<14),< Exalted Carrier Single Sideband LSB
|
||||
RIG_MODE_FAX = (1<<15) < Facsimile Mode
|
||||
Current mode :-
|
||||
RIG_MODE_NONE = 0, < None
|
||||
1 = AM RIG_MODE_AM = (1<<0), < Amplitude Modulation
|
||||
5 = CW RIG_MODE_CW = (1<<1), < CW
|
||||
7 = USB RIG_MODE_USB = (1<<2), < Upper Side Band
|
||||
6 = LSB RIG_MODE_LSB = (1<<3), < Lower Side Band
|
||||
4 = Data RIG_MODE_RTTY = (1<<4), < Remote Teletype
|
||||
3 = NFM RIG_MODE_FM = (1<<5), < "narrow" band FM
|
||||
RIG_MODE_WFM = (1<<6), < broadcast wide FM
|
||||
RIG_MODE_CWR = (1<<7), < CW reverse sideband
|
||||
RIG_MODE_RTTYR = (1<<8), < RTTY reverse sideband
|
||||
2 = Sync RIG_MODE_AMS = (1<<9), < Amplitude Modulation Synchronous
|
||||
RIG_MODE_PKTLSB = (1<<10),< Packet/Digital LSB mode (dedicated port)
|
||||
RIG_MODE_PKTUSB = (1<<11),< Packet/Digital USB mode (dedicated port)
|
||||
RIG_MODE_PKTFM = (1<<12),< Packet/Digital FM mode (dedicated port)
|
||||
RIG_MODE_ECSSUSB = (1<<13),< Exalted Carrier Single Sideband USB
|
||||
RIG_MODE_ECSSLSB = (1<<14),< Exalted Carrier Single Sideband LSB
|
||||
RIG_MODE_FAX = (1<<15) < Facsimile Mode
|
||||
*/
|
||||
static int ar7030_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
|
||||
{
|
||||
|
@ -384,7 +383,7 @@ static int ar7030_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
|
|||
// filter Mem_Page=0 Address=34
|
||||
// Current filter number (1 to 6).
|
||||
Execute_Routine_4_1(rig, 0, 0x34, filter_num);
|
||||
|
||||
|
||||
return RIG_OK;
|
||||
}
|
||||
|
||||
|
@ -418,7 +417,7 @@ static int ar7030_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
|
|||
break;
|
||||
default :
|
||||
return -RIG_EINVAL;
|
||||
}
|
||||
}
|
||||
// fltbw Mem_Page=0 Address=38
|
||||
// Filter bandwidth dezimal in Hz.
|
||||
// Filter bandwidth (2 BCD digits : x.x kHz).
|
||||
|
@ -430,62 +429,62 @@ static int ar7030_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
|
|||
}
|
||||
|
||||
return RIG_OK;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
RIG_LEVEL_NONE = 0, < None
|
||||
RIG_LEVEL_PREAMP = (1<<0), < Preamp, arg int (dB)
|
||||
RIG_LEVEL_ATT = (1<<1), < Attenuator, arg int (dB)
|
||||
RIG_LEVEL_VOX = (1<<2), < VOX delay, arg int (tenth of seconds)
|
||||
af_vol RIG_LEVEL_AF = (1<<3), < Volume, arg float [0.0..1.0]
|
||||
RIG_LEVEL_NONE = 0, < None
|
||||
RIG_LEVEL_PREAMP = (1<<0), < Preamp, arg int (dB)
|
||||
RIG_LEVEL_ATT = (1<<1), < Attenuator, arg int (dB)
|
||||
RIG_LEVEL_VOX = (1<<2), < VOX delay, arg int (tenth of seconds)
|
||||
af_vol RIG_LEVEL_AF = (1<<3), < Volume, arg float [0.0..1.0]
|
||||
rfgain RIG_LEVEL_RF = (1<<4), < RF gain (not TX power), arg float [-0.4..0.0..0.1 > -40..0..10 dB]
|
||||
sqlval RIG_LEVEL_SQL = (1<<5), < Squelch, arg float [0.0 .. 1.0]
|
||||
RIG_LEVEL_IF = (1<<6), < IF, arg int (Hz)
|
||||
RIG_LEVEL_APF = (1<<7), < APF, arg float [0.0 .. 1.0]
|
||||
RIG_LEVEL_NR = (1<<8), < Noise Reduction, arg float [0.0 .. 1.0]
|
||||
RIG_LEVEL_PBT_IN = (1<<9), < Twin PBT (inside), arg float [0.0 .. 1.0]
|
||||
RIG_LEVEL_PBT_OUT = (1<<10),< Twin PBT (outside), arg float [0.0 .. 1.0]
|
||||
bfoval RIG_LEVEL_CWPITCH = (1<<11),< CW pitch, arg int (Hz)
|
||||
RIG_LEVEL_RFPOWER = (1<<12),< RF Power, arg float [0.0 .. 1.0]
|
||||
RIG_LEVEL_MICGAIN = (1<<13),< MIC Gain, arg float [0.0 .. 1.0]
|
||||
RIG_LEVEL_KEYSPD = (1<<14),< Key Speed, arg int (WPM)
|
||||
RIG_LEVEL_NOTCHF = (1<<15),< Notch Freq., arg int (Hz)
|
||||
RIG_LEVEL_COMP = (1<<16),< Compressor, arg float [0.0 .. 1.0]
|
||||
sqlval RIG_LEVEL_SQL = (1<<5), < Squelch, arg float [0.0 .. 1.0]
|
||||
RIG_LEVEL_IF = (1<<6), < IF, arg int (Hz)
|
||||
RIG_LEVEL_APF = (1<<7), < APF, arg float [0.0 .. 1.0]
|
||||
RIG_LEVEL_NR = (1<<8), < Noise Reduction, arg float [0.0 .. 1.0]
|
||||
RIG_LEVEL_PBT_IN = (1<<9), < Twin PBT (inside), arg float [0.0 .. 1.0]
|
||||
RIG_LEVEL_PBT_OUT = (1<<10),< Twin PBT (outside), arg float [0.0 .. 1.0]
|
||||
bfoval RIG_LEVEL_CWPITCH = (1<<11),< CW pitch, arg int (Hz)
|
||||
RIG_LEVEL_RFPOWER = (1<<12),< RF Power, arg float [0.0 .. 1.0]
|
||||
RIG_LEVEL_MICGAIN = (1<<13),< MIC Gain, arg float [0.0 .. 1.0]
|
||||
RIG_LEVEL_KEYSPD = (1<<14),< Key Speed, arg int (WPM)
|
||||
RIG_LEVEL_NOTCHF = (1<<15),< Notch Freq., arg int (Hz)
|
||||
RIG_LEVEL_COMP = (1<<16),< Compressor, arg float [0.0 .. 1.0]
|
||||
agcspd RIG_LEVEL_AGC = (1<<17),< AGC, arg int (see enum agc_level_e)
|
||||
Current AGC speed : 0 = Fast 2 = Slow 1 = Medium 3 = Off.
|
||||
RIG_LEVEL_BKINDL = (1<<18),< BKin Delay, arg int (tenth of dots)
|
||||
RIG_LEVEL_BALANCE = (1<<19),< Balance (Dual Watch), arg float [0.0 .. 1.0]
|
||||
RIG_LEVEL_METER = (1<<20),< Display meter, arg int (see enum meter_level_e)
|
||||
Current AGC speed : 0 = Fast 2 = Slow 1 = Medium 3 = Off.
|
||||
RIG_LEVEL_BKINDL = (1<<18),< BKin Delay, arg int (tenth of dots)
|
||||
RIG_LEVEL_BALANCE = (1<<19),< Balance (Dual Watch), arg float [0.0 .. 1.0]
|
||||
RIG_LEVEL_METER = (1<<20),< Display meter, arg int (see enum meter_level_e)
|
||||
|
||||
RIG_LEVEL_VOXGAIN = (1<<21),< VOX gain level, arg float [0.0 .. 1.0]
|
||||
RIG_LEVEL_VOXDELAY = RIG_LEVEL_VOX, < VOX delay, arg int (tenth of seconds)
|
||||
RIG_LEVEL_ANTIVOX = (1<<22),< anti-VOX level, arg float [0.0 .. 1.0]
|
||||
RIG_LEVEL_LINEOUT = (1<<23),< Lineout Volume, arg float [0.0 .. 1.0]
|
||||
RIG_LEVEL_VOXGAIN = (1<<21),< VOX gain level, arg float [0.0 .. 1.0]
|
||||
RIG_LEVEL_VOXDELAY = RIG_LEVEL_VOX, < VOX delay, arg int (tenth of seconds)
|
||||
RIG_LEVEL_ANTIVOX = (1<<22),< anti-VOX level, arg float [0.0 .. 1.0]
|
||||
RIG_LEVEL_LINEOUT = (1<<23),< Lineout Volume, arg float [0.0 .. 1.0]
|
||||
|
||||
< These ones are not settable
|
||||
< These ones are not settable
|
||||
Rou.14 RIG_LEVEL_RAWSTR = (1<<26),< Raw (A/D) value for signal strength, specific to each rig, arg int
|
||||
RIG_LEVEL_SQLSTAT = (1<<27),< SQL status, arg int (open=1/closed=0). Deprecated, use get_dcd
|
||||
instead
|
||||
RIG_LEVEL_SWR = (1<<28),< SWR, arg float
|
||||
RIG_LEVEL_ALC = (1<<29),< ALC, arg float
|
||||
instead
|
||||
RIG_LEVEL_SWR = (1<<28),< SWR, arg float
|
||||
RIG_LEVEL_ALC = (1<<29),< ALC, arg float
|
||||
smval RIG_LEVEL_STRENGTH = (1<<30) < Effective (calibrated) signal strength relative to S9, arg int(dB)
|
||||
RIG_LEVEL_BWC = (1<<31) < Bandwidth Control, arg int (Hz)
|
||||
RIG_LEVEL_BWC = (1<<31) < Bandwidth Control, arg int (Hz)
|
||||
*/
|
||||
static int ar7030_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
|
||||
{
|
||||
switch(level)
|
||||
{
|
||||
case RIG_LEVEL_AF :
|
||||
// af_vol Mem_Page=0 Address=1E
|
||||
// af_vol Mem_Page=0 Address=1E
|
||||
// Main channel volume (6-bits, values 15 to 63)
|
||||
val.f = (val.f * 50) + 15;
|
||||
if (val.f < 15){val.f = 15;}
|
||||
if (val.f > 63){val.f = 63;}
|
||||
Execute_Routine_4_1(rig, 0 ,0x1e , val.f);
|
||||
return RIG_OK;
|
||||
case RIG_LEVEL_RF :
|
||||
case RIG_LEVEL_RF :
|
||||
// rfgain Mem_Page=0 Address=30
|
||||
// Current RF gain setting (0 to 5) (0=max gain)
|
||||
val.f = ((val.f * 10) - 1) * -1;
|
||||
|
@ -493,14 +492,14 @@ static int ar7030_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
|
|||
if (val.f > 5){val.f = 5;}
|
||||
Execute_Routine_6_1(rig, 0 ,0x30 , val.f) ;
|
||||
return RIG_OK;
|
||||
case RIG_LEVEL_SQL :
|
||||
case RIG_LEVEL_SQL :
|
||||
// sqlval Mem_Page=0 Address=33
|
||||
// Squelch value (current setting)(values 0 to 150)
|
||||
if (val.f < 0){val.f = 0;}
|
||||
if (val.f > 1){val.f = 1;}
|
||||
Execute_Routine_6_1(rig, 0 ,0x33 , val.f * 150);
|
||||
return RIG_OK;
|
||||
case RIG_LEVEL_CWPITCH :
|
||||
case RIG_LEVEL_CWPITCH :
|
||||
// bfoval Mem_Page=0 Address=36
|
||||
// BFO offset in Hz (x33.19Hz)(values -4248.320 to 4215.130kHz).
|
||||
val.i = val.i * 100 / 3319;
|
||||
|
@ -508,7 +507,7 @@ static int ar7030_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
|
|||
if (val.i > 127){val.i = 127;}
|
||||
Execute_Routine_3_1(rig, 0 ,0x36 , val.i);
|
||||
return RIG_OK;
|
||||
case RIG_LEVEL_AGC :
|
||||
case RIG_LEVEL_AGC :
|
||||
//ar7030 agcspd 3 > RIG_AGC_OFF
|
||||
// > RIG_AGC_SUPERFAST
|
||||
//ar7030 agcspd 0 > RIG_AGC_FAST
|
||||
|
@ -517,18 +516,18 @@ static int ar7030_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
|
|||
//ar7030 agcspd 1 > RIG_AGC_MEDIUM
|
||||
// agcspd Mem_Page=0 Address=32
|
||||
// Current AGC speed : 0 = Fast 2 = Slow 1 = Medium 3 = Off
|
||||
switch (val.i)
|
||||
switch (val.i)
|
||||
{
|
||||
case RIG_AGC_OFF:
|
||||
case RIG_AGC_OFF:
|
||||
Execute_Routine_6_1(rig, 0 ,0x32 , 3);
|
||||
break;
|
||||
case RIG_AGC_SLOW:
|
||||
case RIG_AGC_SLOW:
|
||||
Execute_Routine_6_1(rig, 0 ,0x32 , 2);
|
||||
break;
|
||||
case RIG_AGC_MEDIUM:
|
||||
case RIG_AGC_MEDIUM:
|
||||
Execute_Routine_6_1(rig, 0 ,0x32 , 1);
|
||||
break;
|
||||
case RIG_AGC_FAST:
|
||||
case RIG_AGC_FAST:
|
||||
Execute_Routine_6_1(rig, 0 ,0x32 , 0);
|
||||
break;
|
||||
default:
|
||||
|
@ -550,27 +549,27 @@ static int ar7030_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
|
|||
// af_vol Mem_Page=0 Address=1E
|
||||
// Main channel volume (6-bits, values 15 to 63)
|
||||
setMemPtr(rig ,0 ,0x1e);
|
||||
val->f = (float)(rxr_readByte(rig) - 15) / 50;
|
||||
val->f = (float)(rxr_readByte(rig) - 15) / 50;
|
||||
return RIG_OK;
|
||||
case RIG_LEVEL_RF :
|
||||
case RIG_LEVEL_RF :
|
||||
// rfgain Mem_Page=0 Address=30
|
||||
// Current RF gain setting (0 to 5) (0=max gain)
|
||||
setMemPtr(rig ,0 ,0x30);
|
||||
val->f = (float)((rxr_readByte(rig) * -1) + 1) / 10;
|
||||
return RIG_OK;
|
||||
case RIG_LEVEL_SQL :
|
||||
case RIG_LEVEL_SQL :
|
||||
// sqlval Mem_Page=0 Address=33
|
||||
// Squelch value (current setting)(values 0 to 150)
|
||||
setMemPtr(rig ,0 ,0x33);
|
||||
val->f = (float)rxr_readByte(rig) / 150;
|
||||
return RIG_OK;
|
||||
case RIG_LEVEL_CWPITCH :
|
||||
case RIG_LEVEL_CWPITCH :
|
||||
// bfoval Mem_Page=0 Address=36
|
||||
// BFO offset in Hz (x33.19Hz)(values -4248.320 to 4215.130kHz).
|
||||
setMemPtr(rig ,0 ,0x36);
|
||||
val->i = ((char)rxr_readByte(rig) * 3319) / 100;
|
||||
return RIG_OK;
|
||||
case RIG_LEVEL_AGC :
|
||||
case RIG_LEVEL_AGC :
|
||||
//ar7030 agcspd 3 > RIG_AGC_OFF
|
||||
// > RIG_AGC_SUPERFAST,
|
||||
//ar7030 agcspd 0 > RIG_AGC_FAST,
|
||||
|
@ -580,35 +579,35 @@ static int ar7030_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
|
|||
// agcspd Mem_Page=0 Address=32
|
||||
// Current AGC speed : 0 = Fast 2 = Slow 1 = Medium 3 = Off
|
||||
setMemPtr(rig ,0 ,0x32);
|
||||
switch (rxr_readByte(rig))
|
||||
switch (rxr_readByte(rig))
|
||||
{
|
||||
case 0:
|
||||
case 0:
|
||||
val->i = RIG_AGC_FAST;
|
||||
break;
|
||||
case 1:
|
||||
val->i = RIG_AGC_MEDIUM;
|
||||
break;
|
||||
case 2:
|
||||
case 2:
|
||||
val->i = RIG_AGC_SLOW;
|
||||
break;
|
||||
case 3:
|
||||
val->i = RIG_AGC_OFF;
|
||||
case 3:
|
||||
val->i = RIG_AGC_OFF;
|
||||
break;
|
||||
default:
|
||||
return -RIG_EINVAL;
|
||||
}
|
||||
return RIG_OK;
|
||||
// case RIG_LEVEL_LINEOUT :
|
||||
// geht nicht in hamlib
|
||||
// case RIG_LEVEL_LINEOUT :
|
||||
// geht nicht in hamlib
|
||||
// // af_axl Mem_Page=0 Address=23 Bit=0 - 5
|
||||
// setMemPtr(rig ,0 ,0x23);
|
||||
// val->f = ((float)(rxr_readByte(rig) - 27) * 2) / 100;
|
||||
// val->f = ((float)(rxr_readByte(rig) - 27) * 2) / 100;
|
||||
// // af_axr Mem_Page=0 Address=24 Bit=0 - 5
|
||||
// return RIG_OK;
|
||||
|
||||
case RIG_LEVEL_RAWSTR :
|
||||
// Routine 14 Read signal strength
|
||||
// Read signal strength Transmits byte representing received signal strength
|
||||
// Read signal strength Transmits byte representing received signal strength
|
||||
// (read from AGC voltage). Output is 8-bit binary in range 0 to 255
|
||||
val->i = Execute_Routine_14(rig);
|
||||
return RIG_OK;
|
||||
|
@ -642,10 +641,10 @@ static int ar7030_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
|
|||
|
||||
static int ar7030_set_powerstat(RIG *rig, powerstat_t status)
|
||||
{
|
||||
// Radio power state.
|
||||
// 0 > RIG_POWER_OFF Power off
|
||||
// 1 > RIG_POWER_ON Power on
|
||||
// 2 > RIG_POWER_STANDBY Standby
|
||||
// Radio power state.
|
||||
// 0 > RIG_POWER_OFF Power off
|
||||
// 1 > RIG_POWER_ON Power on
|
||||
// 2 > RIG_POWER_STANDBY Standby
|
||||
switch (status) {
|
||||
|
||||
case RIG_POWER_OFF:
|
||||
|
@ -676,14 +675,14 @@ static int ar7030_get_powerstat(RIG *rig, powerstat_t *status)
|
|||
|
||||
static int ar7030_reset(RIG *rig, reset_t reset)
|
||||
{
|
||||
// Reset operation.
|
||||
// 0 > RIG_RESET_NONE No reset
|
||||
// 1 > RIG_RESET_SOFT Software reset
|
||||
// 2 > RIG_RESET_VFO VFO reset
|
||||
// 3 > RIG_RESET_MCALL Memory clear
|
||||
// 4 > RIG_RESET_MASTER Master reset
|
||||
// Reset operation.
|
||||
// 0 > RIG_RESET_NONE No reset
|
||||
// 1 > RIG_RESET_SOFT Software reset
|
||||
// 2 > RIG_RESET_VFO VFO reset
|
||||
// 3 > RIG_RESET_MCALL Memory clear
|
||||
// 4 > RIG_RESET_MASTER Master reset
|
||||
switch(reset) {
|
||||
|
||||
|
||||
// Routine 0 Reset Setup receiver as at switch-on.
|
||||
case RIG_RESET_SOFT :
|
||||
Execute_Routine_0(rig) ;
|
||||
|
@ -698,11 +697,11 @@ static int ar7030_reset(RIG *rig, reset_t reset)
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -792,11 +791,11 @@ const struct rig_caps ar7030_caps = {
|
|||
/* mode/filter list, .remember = order matters! */
|
||||
.filters = {
|
||||
/* mode/filter list, .remember = order matters! */
|
||||
{RIG_MODE_SSB|RIG_MODE_CW, kHz(3)},
|
||||
{RIG_MODE_SSB|RIG_MODE_CW, kHz(3)},
|
||||
{RIG_MODE_SSB|RIG_MODE_CW, kHz(0.8)}, /* narrow */
|
||||
{RIG_MODE_SSB, kHz(4.8)}, /* wide */
|
||||
{RIG_MODE_CW, kHz(9.5)}, /* wide */
|
||||
{RIG_MODE_FM|RIG_MODE_AM, kHz(15)},
|
||||
{RIG_MODE_FM|RIG_MODE_AM, kHz(15)},
|
||||
{RIG_MODE_FM|RIG_MODE_AM, kHz(6)}, /* narrow */
|
||||
{RIG_MODE_FM|RIG_MODE_AM, kHz(30)}, /* wide */
|
||||
RIG_FLT_END,
|
||||
|
@ -809,17 +808,17 @@ const struct rig_caps ar7030_caps = {
|
|||
// .rig_open = ar7030_open,
|
||||
// .rig_close = ar7030_close,
|
||||
|
||||
.set_freq = ar7030_set_freq,
|
||||
.get_freq = ar7030_get_freq,
|
||||
.set_mode = ar7030_set_mode,
|
||||
.get_mode = ar7030_get_mode,
|
||||
.set_freq = ar7030_set_freq,
|
||||
.get_freq = ar7030_get_freq,
|
||||
.set_mode = ar7030_set_mode,
|
||||
.get_mode = ar7030_get_mode,
|
||||
// .set_vfo = ar7030_set_vfo,
|
||||
// .get_vfo = ar7030_get_vfo,
|
||||
|
||||
|
||||
.set_powerstat = ar7030_set_powerstat,
|
||||
.get_powerstat = ar7030_get_powerstat,
|
||||
.set_level = ar7030_set_level,
|
||||
.get_level = ar7030_get_level,
|
||||
.set_level = ar7030_set_level,
|
||||
.get_level = ar7030_get_level,
|
||||
// .set_func = ar7030_set_func,
|
||||
// .get_func = ar7030_get_func,
|
||||
// .set_parm = ar7030_set_parm,
|
||||
|
|
|
@ -2,21 +2,22 @@
|
|||
/*
|
||||
* Hamlib AOR backend - AR7030 Plus description
|
||||
* Copyright (c) 2000-2010 by Stephane Fillod & Fritz Melchert
|
||||
* Copyright (c) 2009-2010 by Larry Gadallah (VE6VQ)
|
||||
*
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -96,7 +97,7 @@
|
|||
- Width
|
||||
- Scan lockout
|
||||
- PBT
|
||||
- Squelch
|
||||
- Squelch
|
||||
- ID
|
||||
*/
|
||||
#define AR7030P_MEM_CAP { \
|
||||
|
@ -130,7 +131,7 @@ static const struct ar7030p_priv_caps ar7030p_priv_caps = {
|
|||
|
||||
#define NB_CHAN 400 /* see caps->chan_list */
|
||||
|
||||
struct ar7030p_priv_data
|
||||
struct ar7030p_priv_data
|
||||
{
|
||||
vfo_t curr_vfo;
|
||||
vfo_t last_vfo; /* VFO A or VFO B, when in MEM mode */
|
||||
|
@ -140,7 +141,7 @@ struct ar7030p_priv_data
|
|||
value_t parms[ RIG_SETTING_MAX ];
|
||||
|
||||
channel_t *curr; /* points to vfo_a, vfo_b or mem[] */
|
||||
|
||||
|
||||
channel_t vfo_a;
|
||||
channel_t vfo_b;
|
||||
channel_t mem[ NB_CHAN ];
|
||||
|
@ -148,7 +149,7 @@ struct ar7030p_priv_data
|
|||
struct ext_list *ext_parms;
|
||||
};
|
||||
|
||||
static const struct confparams ar7030p_ext_levels[] =
|
||||
static const struct confparams ar7030p_ext_levels[] =
|
||||
{
|
||||
{ TOK_EL_MAGICLEVEL, "MGL", "Magic level", "Magic level, as an example",
|
||||
NULL, RIG_CONF_NUMERIC, { .n = { 0, 1, .001 } } },
|
||||
|
@ -162,7 +163,7 @@ static const struct confparams ar7030p_ext_levels[] =
|
|||
{ RIG_CONF_END, NULL, }
|
||||
};
|
||||
|
||||
static const struct confparams ar7030p_ext_parms[] =
|
||||
static const struct confparams ar7030p_ext_parms[] =
|
||||
{
|
||||
{ TOK_EP_MAGICPARM, "MGP", "Magic parm", "Magic parameter, as an example",
|
||||
NULL, RIG_CONF_NUMERIC, { .n = { 0, 1, .001 } } },
|
||||
|
@ -250,7 +251,7 @@ static int ar7030p_init( RIG *rig )
|
|||
|
||||
rig_debug(RIG_DEBUG_VERBOSE,"%s called\n", __func__);
|
||||
|
||||
priv = (struct ar7030p_priv_data *)
|
||||
priv = (struct ar7030p_priv_data *)
|
||||
malloc( sizeof( struct ar7030p_priv_data ) );
|
||||
|
||||
if (!priv)
|
||||
|
@ -270,7 +271,7 @@ static int ar7030p_init( RIG *rig )
|
|||
|
||||
memset(priv->mem, 0, sizeof( priv->mem ) );
|
||||
|
||||
for ( i = 0; i < NB_CHAN; i++ )
|
||||
for ( i = 0; i < NB_CHAN; i++ )
|
||||
{
|
||||
priv->mem[ i ].channel_num = i;
|
||||
priv->mem[ i ].vfo = RIG_VFO_MEM;
|
||||
|
@ -293,7 +294,7 @@ static int ar7030p_init( RIG *rig )
|
|||
return -RIG_ENOMEM;
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
priv->vfo_b.ext_levels = alloc_init_ext( ar7030p_ext_levels );
|
||||
}
|
||||
|
||||
|
@ -330,7 +331,7 @@ static int ar7030p_cleanup( RIG *rig )
|
|||
|
||||
rig_debug(RIG_DEBUG_VERBOSE,"%s called\n", __FUNCTION__);
|
||||
|
||||
for ( i = 0; i < NB_CHAN; i++ )
|
||||
for ( i = 0; i < NB_CHAN; i++ )
|
||||
{
|
||||
free( priv->mem[ i ].ext_levels );
|
||||
}
|
||||
|
@ -344,7 +345,7 @@ static int ar7030p_cleanup( RIG *rig )
|
|||
{
|
||||
free( rig->state.priv );
|
||||
}
|
||||
|
||||
|
||||
rig->state.priv = NULL;
|
||||
|
||||
return( rc );
|
||||
|
@ -473,7 +474,7 @@ static int ar7030p_set_freq( RIG * rig, vfo_t vfo, freq_t freq )
|
|||
{
|
||||
caps = rig->caps;
|
||||
|
||||
if ( ( caps->rx_range_list1[ 0 ].end > freq ) &&
|
||||
if ( ( caps->rx_range_list1[ 0 ].end > freq ) &&
|
||||
( caps->rx_range_list1[ 0 ].start < freq ) )
|
||||
{
|
||||
switch( vfo )
|
||||
|
@ -592,7 +593,7 @@ static int ar7030p_set_mode( RIG * rig, vfo_t vfo, rmode_t mode,
|
|||
}
|
||||
}
|
||||
|
||||
rig_debug( RIG_DEBUG_VERBOSE, "%s: width %d ar_filter %d filterTab[%d] %d\n",
|
||||
rig_debug( RIG_DEBUG_VERBOSE, "%s: width %d ar_filter %d filterTab[%d] %d\n",
|
||||
__func__, width, ar_filter, i, filterTab[i] );
|
||||
}
|
||||
}
|
||||
|
@ -632,7 +633,7 @@ static int ar7030p_get_mode( RIG * rig, vfo_t vfo, rmode_t * mode,
|
|||
|
||||
rc = lockRx( rig, LOCK_1 );
|
||||
if ( RIG_OK == rc )
|
||||
{
|
||||
{
|
||||
/* TODO - deal with selected VFO */
|
||||
rc = readByte( rig, WORKING, MODE, &m );
|
||||
if ( RIG_OK == rc )
|
||||
|
@ -658,7 +659,7 @@ static int ar7030p_get_mode( RIG * rig, vfo_t vfo, rmode_t * mode,
|
|||
* /param chan Channel number (0-399)
|
||||
* /param freq Pointer to frequency value
|
||||
* /param mode Pointer to mode value (1-7)
|
||||
* /param filt Pointer to filter value (1-6)
|
||||
* /param filt Pointer to filter value (1-6)
|
||||
* /param pbs Pointer to passband tuning value
|
||||
* /param sql Pointer to squelch value (0-255)
|
||||
* /param id Pointer to channel ident string (14 chars)
|
||||
|
@ -698,14 +699,14 @@ static void ar7030p_get_memory( RIG * rig, const unsigned int chan,
|
|||
}
|
||||
else
|
||||
{
|
||||
rc = readByte( rig, EEPROM3, (MEY_SQ + ((chan - 176) * 16) ), &v ); /* mey_sq */
|
||||
rc = readByte( rig, EEPROM3, (MEY_SQ + ((chan - 176) * 16) ), &v ); /* mey_sq */
|
||||
}
|
||||
|
||||
if ( RIG_OK == rc )
|
||||
{
|
||||
*sql = v;
|
||||
}
|
||||
|
||||
|
||||
/* Frequency, mode and filter values */
|
||||
if ( 100 > chan )
|
||||
{
|
||||
|
@ -795,7 +796,7 @@ static int ar7030p_set_level( RIG * rig, vfo_t vfo, setting_t level,
|
|||
{
|
||||
case RIG_LEVEL_PREAMP:
|
||||
/* Scale parameter */
|
||||
if ( 10 <= val.i )
|
||||
if ( 10 <= val.i )
|
||||
{
|
||||
v = (unsigned char) 0;
|
||||
}
|
||||
|
@ -813,7 +814,7 @@ static int ar7030p_set_level( RIG * rig, vfo_t vfo, setting_t level,
|
|||
|
||||
case RIG_LEVEL_ATT:
|
||||
/* Scale parameter */
|
||||
if ( 10 > val.i )
|
||||
if ( 10 > val.i )
|
||||
{
|
||||
v = (unsigned char) 1;
|
||||
}
|
||||
|
@ -829,7 +830,7 @@ static int ar7030p_set_level( RIG * rig, vfo_t vfo, setting_t level,
|
|||
{
|
||||
v = (unsigned char) 4;
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
v = (unsigned char) 5;
|
||||
}
|
||||
|
@ -947,7 +948,7 @@ static int ar7030p_get_level( RIG * rig, vfo_t vfo, setting_t level,
|
|||
int i;
|
||||
|
||||
rc = lockRx( rig, LOCK_1 );
|
||||
if ( RIG_OK == rc )
|
||||
if ( RIG_OK == rc )
|
||||
{
|
||||
/* TODO - deal with selected VFO */
|
||||
switch ( level )
|
||||
|
@ -993,7 +994,7 @@ static int ar7030p_get_level( RIG * rig, vfo_t vfo, setting_t level,
|
|||
default:
|
||||
case 0:
|
||||
case 1:
|
||||
val->i = 0;
|
||||
val->i = 0;
|
||||
};
|
||||
|
||||
rig_debug( RIG_DEBUG_VERBOSE, "%s: rfgain %d (%d)\n",
|
||||
|
@ -1078,7 +1079,7 @@ static int ar7030p_get_level( RIG * rig, vfo_t vfo, setting_t level,
|
|||
|
||||
/* Scale parameter */
|
||||
val->i = (int) ((float) (x) / NOTCH_STEP_HZ);
|
||||
|
||||
|
||||
rig_debug( RIG_DEBUG_VERBOSE, "%s: nchfr %d (%d)\n",
|
||||
__func__, x, val->i );
|
||||
}
|
||||
|
@ -1133,7 +1134,7 @@ static int ar7030p_set_vfo( RIG * rig, vfo_t vfo )
|
|||
|
||||
assert( NULL != rig );
|
||||
|
||||
switch( vfo )
|
||||
switch( vfo )
|
||||
{
|
||||
case RIG_VFO_B:
|
||||
if ( RIG_VFO_B != priv->curr_vfo )
|
||||
|
@ -1311,7 +1312,7 @@ static int ar7030p_get_dcd( RIG * rig, vfo_t vfo, dcd_t * dcd )
|
|||
assert( NULL != dcd );
|
||||
|
||||
rc = lockRx( rig, LOCK_1 );
|
||||
if ( RIG_OK == rc )
|
||||
if ( RIG_OK == rc )
|
||||
{
|
||||
rc = readByte( rig, WORKING, BITS + 2, &v );
|
||||
if ( RIG_OK == rc )
|
||||
|
@ -1424,7 +1425,7 @@ static int ar7030p_set_powerstat( RIG * rig, powerstat_t status )
|
|||
case RIG_POWER_OFF:
|
||||
break;
|
||||
|
||||
case RIG_POWER_ON:
|
||||
case RIG_POWER_ON:
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -1563,14 +1564,14 @@ static int ar7030p_get_channel( RIG * rig, channel_t * chan )
|
|||
}
|
||||
else
|
||||
{
|
||||
rc = readByte( rig, EEPROM3, (MEY_SQ + ((ch - 176) * 16) ), &v ); /* mey_sq */
|
||||
rc = readByte( rig, EEPROM3, (MEY_SQ + ((ch - 176) * 16) ), &v ); /* mey_sq */
|
||||
}
|
||||
|
||||
if ( RIG_OK == rc )
|
||||
{
|
||||
chan->levels[ LVL_SQL ].f = (float) v / 255.0;
|
||||
}
|
||||
|
||||
|
||||
/* Frequency, mode and filter values */
|
||||
if ( 100 > ch )
|
||||
{
|
||||
|
|
431
aor/ar7030p.h
431
aor/ar7030p.h
|
@ -1,3 +1,25 @@
|
|||
/*
|
||||
* Hamlib AOR backend - AR7030 Plus description
|
||||
* Copyright (c) 2000-2010 by Stephane Fillod & Fritz Melchert
|
||||
* Copyright (c) 2009-2010 by Larry Gadallah (VE6VQ)
|
||||
*
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _AR7030P_H
|
||||
#define _AR7030P_H 1
|
||||
|
||||
|
@ -5,7 +27,6 @@
|
|||
#include "token.h"
|
||||
|
||||
/*
|
||||
$Id: $
|
||||
|
||||
AR-7030 Computer remote control protocol.
|
||||
|
||||
|
@ -13,33 +34,33 @@ Information for firmware releases 1.1A, 1.2A, 1.4A and 1.4B
|
|||
|
||||
1) Remote control overview.
|
||||
|
||||
The AR-7030 receiver allows remote control of all of its functions by means
|
||||
of a direct memory access system. A controlling computer can read and modify
|
||||
the internal memory maps of the receiver to set required parameters and then
|
||||
call for the receiver's control program to process the new settings. Commands
|
||||
to the receiver are byte structured in binary format, so it is not possible
|
||||
The AR-7030 receiver allows remote control of all of its functions by means
|
||||
of a direct memory access system. A controlling computer can read and modify
|
||||
the internal memory maps of the receiver to set required parameters and then
|
||||
call for the receiver's control program to process the new settings. Commands
|
||||
to the receiver are byte structured in binary format, so it is not possible
|
||||
to control from a terminal.
|
||||
|
||||
All multi-byte numbers within the receiver are binary, stored MSB first.
|
||||
|
||||
2) Receiver frequency configuration.
|
||||
|
||||
Receive frequency is set by two oscillators - local and carrier. In AM and FM
|
||||
modes the carrier oscillator is not used, and the final IF frequency is 455
|
||||
kHz. In Sync mode the carrier oscillator is offset by +20.29kHz before mixing
|
||||
Receive frequency is set by two oscillators - local and carrier. In AM and FM
|
||||
modes the carrier oscillator is not used, and the final IF frequency is 455
|
||||
kHz. In Sync mode the carrier oscillator is offset by +20.29kHz before mixing
|
||||
with the IF.
|
||||
|
||||
The IF frequencies have a fixed inter-conversion frequency of 44.545MHz and,
|
||||
The IF frequencies have a fixed inter-conversion frequency of 44.545MHz and,
|
||||
because of the high-side local oscillator, both IF's are inverted.
|
||||
|
||||
The receiver controller processes the following variables to establish the
|
||||
The receiver controller processes the following variables to establish the
|
||||
tuned frequency :-
|
||||
|
||||
[local offset] Frequency shift applied to local oscillator.
|
||||
[carrier offset] 455.00kHz for LSB, USB, Data and CW modes /
|
||||
[carrier offset] 455.00kHz for LSB, USB, Data and CW modes /
|
||||
434.71kHz for Sync mode.
|
||||
|
||||
[filter offset] IF Filter frequency at the (vestigial) carrier position as an
|
||||
[filter offset] IF Filter frequency at the (vestigial) carrier position as an
|
||||
offset from 455kHz.
|
||||
|
||||
[PBS] User set filter shift.
|
||||
|
@ -54,18 +75,18 @@ The relationship between these variables and the tuning is as follows :-
|
|||
|
||||
3) Serial data protocol.
|
||||
|
||||
All data transfers are at 1200 baud, No parity, 8 bits, 1 stop bit
|
||||
(1200 N 8 1). There is no hardware or software flow control other than that
|
||||
inherent in the command structure. The receiver can accept data at any time at
|
||||
full rate provided the IR remote controller is not used or is disabled.
|
||||
A maximum of one byte can be transmitted for each byte received, so data flow
|
||||
All data transfers are at 1200 baud, No parity, 8 bits, 1 stop bit
|
||||
(1200 N 8 1). There is no hardware or software flow control other than that
|
||||
inherent in the command structure. The receiver can accept data at any time at
|
||||
full rate provided the IR remote controller is not used or is disabled.
|
||||
A maximum of one byte can be transmitted for each byte received, so data flow
|
||||
into a controlling computer is appropriately limited.
|
||||
|
||||
Each byte sent to the receiver is a complete command - it is best thought of
|
||||
as two hexadecimal digits - the first digit is the operation code, the second
|
||||
digit is 4-bits of data relating to the operation. Because the receiver
|
||||
operates with 8-bit bytes, intermediate 4-bit values are stored in registers
|
||||
in the receiver for recombination and processing. For example to write into the
|
||||
Each byte sent to the receiver is a complete command - it is best thought of
|
||||
as two hexadecimal digits - the first digit is the operation code, the second
|
||||
digit is 4-bits of data relating to the operation. Because the receiver
|
||||
operates with 8-bit bytes, intermediate 4-bit values are stored in registers
|
||||
in the receiver for recombination and processing. For example to write into the
|
||||
receiver's memory, the following steps would be followed:-
|
||||
|
||||
a) Send address high order 4-bits into H-register
|
||||
|
@ -78,33 +99,33 @@ g) Repeat (e) and (f) for each subsequent byte to be written.
|
|||
|
||||
4) Memory organisation.
|
||||
|
||||
Different memory areas in the receiver are referenced by selecting Pages -
|
||||
Different memory areas in the receiver are referenced by selecting Pages -
|
||||
up to 16 pages are supported.
|
||||
|
||||
The memory is broadly divided into 3 sections :-
|
||||
|
||||
a) Working memory - where all current operating variables are stored and
|
||||
registers and stack are located. This memory is volatile and data is lost
|
||||
a) Working memory - where all current operating variables are stored and
|
||||
registers and stack are located. This memory is volatile and data is lost
|
||||
when power to the receiver is removed.
|
||||
|
||||
b) Battery sustained memory - where duplicate parameters are stored for
|
||||
retention when power is removed. This memory area is also used for storage
|
||||
of filter parameters, setup memories and squelch and BFO settings for the
|
||||
b) Battery sustained memory - where duplicate parameters are stored for
|
||||
retention when power is removed. This memory area is also used for storage
|
||||
of filter parameters, setup memories and squelch and BFO settings for the
|
||||
frequency memories and contains the real time clock registers.
|
||||
|
||||
c) EEPROM - where frequency, mode, filter and PBS information for the
|
||||
frequency memories is stored. Additionally S-meter and IF calibration values
|
||||
are stored here. This memory can be read or written to download and upload
|
||||
the receiver's frequency memories, but repetitive writing should be avoided
|
||||
c) EEPROM - where frequency, mode, filter and PBS information for the
|
||||
frequency memories is stored. Additionally S-meter and IF calibration values
|
||||
are stored here. This memory can be read or written to download and upload
|
||||
the receiver's frequency memories, but repetitive writing should be avoided
|
||||
because the memory devices will only support a finite number of write cycles.
|
||||
|
||||
5) Variations between A and B types and firmware revisions.
|
||||
Type A firmware supports only basic receiver functions, type B extends
|
||||
operations and includes support for the Notch / Noise Blanker option.
|
||||
Type A firmware supports only basic receiver functions, type B extends
|
||||
operations and includes support for the Notch / Noise Blanker option.
|
||||
The whole of the type A memory map is retained in type B, but more
|
||||
memory and operations are added for the extended functions of type B.
|
||||
|
||||
In the following information, circled note numbers are included to indicate
|
||||
In the following information, circled note numbers are included to indicate
|
||||
where items are specific to one type or revision of the firmware:-
|
||||
|
||||
<1> Applicable to type B firmware only.
|
||||
|
@ -112,7 +133,7 @@ where items are specific to one type or revision of the firmware:-
|
|||
<3> Function is changed or added to in type B
|
||||
|
||||
6) Operation codes.
|
||||
The high order 4-bits of each byte sent to the receiver is the operation code,
|
||||
The high order 4-bits of each byte sent to the receiver is the operation code,
|
||||
the low order 4-bits is data (shown here as x) :-
|
||||
|
||||
Code Ident Operation
|
||||
|
@ -129,7 +150,7 @@ Code Ident Operation
|
|||
|
||||
6x WRD Write data Hx => [Page, Address]
|
||||
Address register + 1 => Address register
|
||||
0 => H-register,
|
||||
0 => H-register,
|
||||
0 => Mask register
|
||||
|
||||
9x MSK <1> Set mask Hx => Mask register
|
||||
|
@ -175,32 +196,32 @@ enum OPCODE_e
|
|||
};
|
||||
|
||||
/*
|
||||
Note that the H-register is zeroed after use, and that the high order 4-bits
|
||||
of the Address register must be set (if non-zero) after the low order 8-bits.
|
||||
The Address register is automatically incremented by one after a write data
|
||||
operation and by x after a read data operation. When writing to any of the
|
||||
EEPROM memory pages a time of 10ms per byte has to be allowed. For this reason
|
||||
it is recommended that instructions SRH and WRD are always used together
|
||||
(even if the SRH is not needed) since this will ensure that the EEPROM has
|
||||
Note that the H-register is zeroed after use, and that the high order 4-bits
|
||||
of the Address register must be set (if non-zero) after the low order 8-bits.
|
||||
The Address register is automatically incremented by one after a write data
|
||||
operation and by x after a read data operation. When writing to any of the
|
||||
EEPROM memory pages a time of 10ms per byte has to be allowed. For this reason
|
||||
it is recommended that instructions SRH and WRD are always used together
|
||||
(even if the SRH is not needed) since this will ensure that the EEPROM has
|
||||
sufficient time to complete its write cycle.
|
||||
|
||||
Additionally to allow time for local receiver memory updates and SNC detector
|
||||
sampling in addition to the EEPROM write cycle, it is recommended to lock the
|
||||
receiver to level 2 or 3, or add a NOP instruction after each write. This is
|
||||
Additionally to allow time for local receiver memory updates and SNC detector
|
||||
sampling in addition to the EEPROM write cycle, it is recommended to lock the
|
||||
receiver to level 2 or 3, or add a NOP instruction after each write. This is
|
||||
not required for firmware revision 1.4 but locking is still recommended.
|
||||
|
||||
The mask operation helps with locations in memory that are shared by two
|
||||
parameters and aids setting and clearing bits. The mask operates only in
|
||||
The mask operation helps with locations in memory that are shared by two
|
||||
parameters and aids setting and clearing bits. The mask operates only in
|
||||
Page 0.
|
||||
|
||||
If bits in the mask are set, then a following write operation will leave the
|
||||
corresponding bits unchanged. The mask register is cleared after a write so
|
||||
that subsequent writes are processed normally. Because it defaults to zero at
|
||||
If bits in the mask are set, then a following write operation will leave the
|
||||
corresponding bits unchanged. The mask register is cleared after a write so
|
||||
that subsequent writes are processed normally. Because it defaults to zero at
|
||||
reset, the mask is inoperative unless specifically set.
|
||||
|
||||
The operate button instruction uses the same button codes as are returned
|
||||
from routine 15 (see section 8), with an additional code of zero which
|
||||
operates the power button, but will not switch the receiver off. Also code
|
||||
The operate button instruction uses the same button codes as are returned
|
||||
from routine 15 (see section 8), with an additional code of zero which
|
||||
operates the power button, but will not switch the receiver off. Also code
|
||||
0 will switch the receiver on (from standby state).
|
||||
|
||||
7) Memory pages.
|
||||
|
@ -225,7 +246,7 @@ enum PAGE_e
|
|||
};
|
||||
|
||||
/*
|
||||
The ident is divided into model number (5 bytes), software revision (2 bytes)
|
||||
The ident is divided into model number (5 bytes), software revision (2 bytes)
|
||||
and type letter (1 byte).
|
||||
|
||||
e.g. 7030_14A => Model AR-7030, revision 1.4, type letter A.
|
||||
|
@ -240,19 +261,19 @@ Level 1 IR remote control disabled.
|
|||
Front panel spin-wheels logged but not actioned.
|
||||
Display update (frequency & S-meter) continues.
|
||||
|
||||
Level 2 As level 1, but display update suspended.
|
||||
Level 2 As level 1, but display update suspended.
|
||||
|
||||
In revisions before 1.4 squelch operation is inhibited, which results in
|
||||
no audio output after a mode change. In revision 1.4 squelch operation
|
||||
In revisions before 1.4 squelch operation is inhibited, which results in
|
||||
no audio output after a mode change. In revision 1.4 squelch operation
|
||||
continues and mode changing is as expected.
|
||||
|
||||
Level 3 Remote operation exclusively.
|
||||
|
||||
Lock level 1 is recommended during any multi-byte reads or writes of the
|
||||
receiver's memory to prevent data contention between internal and remote
|
||||
Lock level 1 is recommended during any multi-byte reads or writes of the
|
||||
receiver's memory to prevent data contention between internal and remote
|
||||
memory access. See also EEPROM notes in section (6)
|
||||
*/
|
||||
enum LOCK_LVL_e
|
||||
enum LOCK_LVL_e
|
||||
{
|
||||
LOCK_0 = 0,
|
||||
LOCK_1 = 1,
|
||||
|
@ -266,20 +287,20 @@ enum LOCK_LVL_e
|
|||
|
||||
Routine 0 Reset Setup receiver as at switch-on.
|
||||
|
||||
Routine 1 Set frequency Program local oscillator from frequ area and
|
||||
Routine 1 Set frequency Program local oscillator from frequ area and
|
||||
setup RF filters and oscillator range.
|
||||
|
||||
Routine 2 Set mode Setup from mode byte in memory and display mode,
|
||||
Routine 2 Set mode Setup from mode byte in memory and display mode,
|
||||
select preferred filter and PBS, BFO values etc.
|
||||
|
||||
Routine 3 Set passband Setup all IF parameters from filter, pbsval and
|
||||
Routine 3 Set passband Setup all IF parameters from filter, pbsval and
|
||||
bfoval bytes.
|
||||
|
||||
Routine 4 Set all Set all receiver parameters from current memory values.
|
||||
|
||||
Routine 5 <2> Set audio Setup audio controller from memory register values.
|
||||
|
||||
Routine 6 <2> Set RF-IF Setup RF Gain, IF Gain and AGC speed. Also sets Notch
|
||||
Routine 6 <2> Set RF-IF Setup RF Gain, IF Gain and AGC speed. Also sets Notch
|
||||
Filter and Noise Blanker if these options are fitted.
|
||||
|
||||
Routine 7 Not assigned
|
||||
|
@ -288,28 +309,28 @@ Routine 8 Not assigned
|
|||
|
||||
Routine 9 Direct Rx control Program control register from rxcon area.
|
||||
|
||||
Routine 10 Direct DDS control Program local oscillator and carrier
|
||||
oscillator DDS systems from wbuff area.
|
||||
The 32-bits at wbuff control the carrier frequency,
|
||||
value is 385674.4682 / kHz. The 32 bits at wbuff+4 control
|
||||
Routine 10 Direct DDS control Program local oscillator and carrier
|
||||
oscillator DDS systems from wbuff area.
|
||||
The 32-bits at wbuff control the carrier frequency,
|
||||
value is 385674.4682 / kHz. The 32 bits at wbuff+4 control
|
||||
the local osc frequency, value is 753270.4456 / MHz.
|
||||
|
||||
Routine 11 Display menus Display menus from menu1 and menu2 bytes.
|
||||
|
||||
Routine 12 Display frequency Display frequency from frequ area.
|
||||
|
||||
Routine 13 Display buffer Display ASCII data in wbuff area. First byte is
|
||||
display address, starting at 128 for the top line and 192
|
||||
Routine 13 Display buffer Display ASCII data in wbuff area. First byte is
|
||||
display address, starting at 128 for the top line and 192
|
||||
for the bottom line. An address value of 1 clears the display.
|
||||
Data string (max length 24 characters) ends with a zero byte.
|
||||
|
||||
Routine 14 Read signal strength Transmits byte representing received
|
||||
signal strength (read from AGC voltage). Output is 8-bit
|
||||
Routine 14 Read signal strength Transmits byte representing received
|
||||
signal strength (read from AGC voltage). Output is 8-bit
|
||||
binary in range 0 to 255.
|
||||
|
||||
Routine 15 Read buttons Transmits byte indicating state of front panel
|
||||
buttons. Output is 8-bit binary with an offset of +48
|
||||
(i.e. ASCII numbers). Buttons held continuously will only be
|
||||
Routine 15 Read buttons Transmits byte indicating state of front panel
|
||||
buttons. Output is 8-bit binary with an offset of +48
|
||||
(i.e. ASCII numbers). Buttons held continuously will only be
|
||||
registered once.
|
||||
*/
|
||||
|
||||
|
@ -354,9 +375,9 @@ enum BUTTON_e
|
|||
BTN_POWER = 9
|
||||
};
|
||||
|
||||
/*
|
||||
Note that the work buffer wbuff area in memory is used continuously by the
|
||||
receiver unless lock levels 2 or 3 are invoked. Lock levels of 1 or more
|
||||
/*
|
||||
Note that the work buffer wbuff area in memory is used continuously by the
|
||||
receiver unless lock levels 2 or 3 are invoked. Lock levels of 1 or more
|
||||
should be used when reading any front panel controls to prevent erratic
|
||||
results.
|
||||
|
||||
|
@ -385,17 +406,17 @@ results.
|
|||
21 0x015 pd_ifg 1 byte IF gain
|
||||
22 0x016 pd_flg 1 byte Flags (from pdflgs)
|
||||
23 0x017 pd_frq 3 bytes Frequency
|
||||
26 0x01A pd_mod <3> 1 byte Mode (bits 0-3) and
|
||||
26 0x01A pd_mod <3> 1 byte Mode (bits 0-3) and
|
||||
NB threshold (bits 4-7)
|
||||
27 0x01B pd_vol <3> 1 byte Volume (bits 0-5) and
|
||||
27 0x01B pd_vol <3> 1 byte Volume (bits 0-5) and
|
||||
rx memory hundreds (bits 6&7)
|
||||
28 0x01C 26 bytes Receiver setup save area :-
|
||||
28 0x01C md_flt 1 byte AM mode : Filter (bits 0-3) and
|
||||
28 0x01C md_flt 1 byte AM mode : Filter (bits 0-3) and
|
||||
AGC speed (bits 4-7)
|
||||
29 0x01D md_pbs 1 byte AM mode : PBS value
|
||||
30 0x01E md_bfo 1 byte AM mode : BFO value
|
||||
31 0x01F 3 bytes Ditto for Sync mode
|
||||
34 0x022 3 bytes Ditto for NFM mode -
|
||||
34 0x022 3 bytes Ditto for NFM mode -
|
||||
except Squelch instead of BFO
|
||||
37 0x025 3 bytes Ditto for Data mode
|
||||
40 0x028 3 bytes Ditto for CW mode
|
||||
|
@ -405,7 +426,7 @@ results.
|
|||
bit 5 Notch auto track enable
|
||||
bit 6 Ident search enable
|
||||
bit 7 Ident preview enable
|
||||
50 0x032 1 byte Audio treble setting (bits 0-3) and
|
||||
50 0x032 1 byte Audio treble setting (bits 0-3) and
|
||||
RF Gain (bits 4-7)
|
||||
51 0x033 1 byte Aux output level - left channel
|
||||
52 0x034 1 byte Aux output level - right channel
|
||||
|
@ -423,9 +444,9 @@ results.
|
|||
144 0x090 4 bytes Ditto for filter 4
|
||||
148 0x094 4 bytes Ditto for filter 5
|
||||
152 0x098 4 bytes Ditto for filter 6
|
||||
156 0x09C mem_sq 100 bytes Squelch / BFO values for
|
||||
156 0x09C mem_sq 100 bytes Squelch / BFO values for
|
||||
frequency memories 0 to 99
|
||||
(BFO for Data and CW modes,
|
||||
(BFO for Data and CW modes,
|
||||
Squelch for others)
|
||||
*/
|
||||
#define MAX_MEM_SQL_PAGE0 (99)
|
||||
|
@ -496,9 +517,9 @@ enum BBRAM_mem_e
|
|||
505 0x1F9 1 byte RSS steps up to S9+10 level
|
||||
506 0x1FA 1 byte RSS steps up to S9+30 level
|
||||
507 0x1FB 1 byte RSS steps up to S9+50 level
|
||||
508 0x1FC if_cal 2 bytes RSS offsets for -20dB
|
||||
508 0x1FC if_cal 2 bytes RSS offsets for -20dB
|
||||
and -8dB filter alignment
|
||||
510 0x1FE if_def 1 byte Default filter numbers for
|
||||
510 0x1FE if_def 1 byte Default filter numbers for
|
||||
narrow and wide (2 BCD digits)
|
||||
511 0x1FF option <1> 1 byte Option information :-
|
||||
bit 0 Noise blanker
|
||||
|
@ -539,7 +560,7 @@ enum EEPROM1_mem_e
|
|||
1207 0x4B7 mtm_ac 1 byte active (0 = not active)
|
||||
1208 0x4B8 72 bytes Ditto for timer memories 1 to 9
|
||||
1280 0x500 16 bytes Frequency memory data :-
|
||||
1280 0x500 mex_sq 1 byte Memory 0 : Squelch / BFO (not used for
|
||||
1280 0x500 mex_sq 1 byte Memory 0 : Squelch / BFO (not used for
|
||||
mems 0 to 99)
|
||||
(BFO for Data and CW modes)
|
||||
1281 0x501 mex_pb 1 byte PBS value (not used for mems 0 to 99)
|
||||
|
@ -572,16 +593,16 @@ enum EEPROM2_mem_e
|
|||
|
||||
Address Ident Length Description
|
||||
0 0x000 16 bytes Frequency memory data :-
|
||||
0 0x000 mey_sq 1 byte Memory 176 : Squelch / BFO
|
||||
0 0x000 mey_sq 1 byte Memory 176 : Squelch / BFO
|
||||
(BFO for Data and CW modes)
|
||||
1 0x001 mey_pb 1 byte PBS value
|
||||
2 0x002 mey_id 14 bytes Text Ident
|
||||
16 0x010 3568 bytes Ditto for memories 177 to 399
|
||||
3584 0xE00 mex_hx 400 bytes Frequency fast find index
|
||||
3584 0xE00 mex_hx 400 bytes Frequency fast find index
|
||||
(1 byte for each memory 0 to 399)
|
||||
Index value is bits 9 to 16 of 24-bit
|
||||
frequency stored in each memory. Empty
|
||||
memories (frequency zero) should have
|
||||
Index value is bits 9 to 16 of 24-bit
|
||||
frequency stored in each memory. Empty
|
||||
memories (frequency zero) should have
|
||||
a random index byte.
|
||||
3984 0xF90 112 bytes spare
|
||||
*/
|
||||
|
@ -597,7 +618,7 @@ enum EEPROM3_mem_e
|
|||
/*
|
||||
14) Working memory (Memory page 0)
|
||||
|
||||
Areas not specifically addressed are used as workspace by the internal
|
||||
Areas not specifically addressed are used as workspace by the internal
|
||||
processor. - Keep out (by order).
|
||||
|
||||
Address Ident Length Description
|
||||
|
@ -606,11 +627,11 @@ processor. - Keep out (by order).
|
|||
18 0x012 scnst 1 byte Scan start channel
|
||||
19 0x013 scnsp 1 byte Scan stop channel
|
||||
20 0x014 scndly 1 byte Scan delay time value x 0.125 seconds
|
||||
21 0x015 chnstp 2 bytes 16-bit channel step size,
|
||||
21 0x015 chnstp 2 bytes 16-bit channel step size,
|
||||
value is 376.6352 / kHz
|
||||
23 0x017 sqlsav 1 byte Squelch save value (non-fm mode)
|
||||
24 0x018 ifgain 1 byte IF gain value (zero is max gain)
|
||||
26 0x01A frequ 3 bytes 24-bit tuned frequency,
|
||||
26 0x01A frequ 3 bytes 24-bit tuned frequency,
|
||||
value is 376635.2228 / MHz.
|
||||
29 0x01D mode 1 byte Current mode :- 1 = AM 4 = Data
|
||||
2 = Sync 5 = CW
|
||||
|
@ -618,22 +639,22 @@ processor. - Keep out (by order).
|
|||
7 = USB
|
||||
30 0x01E 10 bytes Audio control registers :-
|
||||
30 0x01E af_vol 1 byte Main channel volume (6-bits, values 15 to 63)
|
||||
31 0x01F af_vll 1 byte Left channel balance
|
||||
31 0x01F af_vll 1 byte Left channel balance
|
||||
(5-bits, half of volume value above)
|
||||
32 0x020 af_vlr 1 byte Right channel balance (as above)
|
||||
33 0x021 af_bas <1> 1 byte Main channel bass
|
||||
33 0x021 af_bas <1> 1 byte Main channel bass
|
||||
(bits 0-4, values 6 to 25, 15 is flat)
|
||||
bit 5 nchtrk Notch auto track enable
|
||||
bit 6 idauto Ident auto search enable
|
||||
bit 7 idprev Ident auto preview enable
|
||||
34 0x022 af_trb <3> 1 byte Main channel treble
|
||||
34 0x022 af_trb <3> 1 byte Main channel treble
|
||||
(bits 0-3, values 2 to 10, 6 is flat)
|
||||
bit 4 nb_opt Noise blanker menus enabled
|
||||
bit 5 nt_opt Notch Filter menus enabled
|
||||
bit 6 step10 10 dB RF attenuator fitted
|
||||
35 0x023 af_axl 1 byte Left aux channel level
|
||||
35 0x023 af_axl 1 byte Left aux channel level
|
||||
(bits 0-5, values 27 to 63)
|
||||
36 0x024 af_axr <3> 1 byte Right aux channel level
|
||||
36 0x024 af_axr <3> 1 byte Right aux channel level
|
||||
(bits 0-5, values 27 to 63)
|
||||
bit 7 nchsr Notch search running
|
||||
37 0x025 af_axs <3> 1 byte Aux channel source (bits 0-3)
|
||||
|
@ -735,15 +756,15 @@ processor. - Keep out (by order).
|
|||
72 0x048 runtmr 1 byte Sleep mode timer
|
||||
73 0x049 snfrq 1 byte Sync detector frequency offset cal value
|
||||
74 0x04A frange 1 byte Input / LO range
|
||||
75 0x04B menu1 <3> 1 byte Current left menu (type A and B menu
|
||||
75 0x04B menu1 <3> 1 byte Current left menu (type A and B menu
|
||||
numbers are different)
|
||||
76 0x04C menu2 <3> 1 byte Current right menu (type A and B menu
|
||||
76 0x04C menu2 <3> 1 byte Current right menu (type A and B menu
|
||||
numbers are different)
|
||||
77 0x04D memno 1 byte Current memory number
|
||||
78 0x04E setno 1 byte Setup / config selection - load / save
|
||||
85 0x055 mempg <1> 1 byte Memory page (hundreds - value 0 to 3)
|
||||
86 0x056 nbthr <1> 1 byte Noise blanker threshold (values 0 to 15)
|
||||
87 0x057 hshfr <1> 1 byte Current tuned frequ index value
|
||||
87 0x057 hshfr <1> 1 byte Current tuned frequ index value
|
||||
(during ident search)
|
||||
88 0x058 nchtmr <1> 1 byte Notch filter auto tune / search timer
|
||||
90 0x059 wbuff 26 bytes Work buffer
|
||||
|
@ -753,9 +774,9 @@ processor. - Keep out (by order).
|
|||
140 0x08C carofs 4 bytes 32-bit carrier osc offset
|
||||
144 0x090 smofs 1 byte S-meter starting offset
|
||||
145 0x091 smscl 7 bytes S-meter segment values
|
||||
152 0x098 ifcal 2 bytes RSS offsets for -20 dB and
|
||||
152 0x098 ifcal 2 bytes RSS offsets for -20 dB and
|
||||
-5 dB filter alignment
|
||||
154 0x09A ifdef 1 byte Default filter numbers for narrow and wide
|
||||
154 0x09A ifdef 1 byte Default filter numbers for narrow and wide
|
||||
(2 digits)
|
||||
155 0x09B vfo_b 22 bytes VFO B storage area :-
|
||||
155 0x09B 1 byte B : Scan delay time
|
||||
|
@ -780,7 +801,7 @@ processor. - Keep out (by order).
|
|||
218 0x0DA savmnu <1> 1 byte Saved menu 1 number during ident display
|
||||
219 0x0DB srchm <1> 2 bytes Ident search memory (page and number)
|
||||
222 0x0DD idtmr <1> 1 byte Auto ident search start timer
|
||||
223 0x0DE nchfr <1> 2 bytes 16-bit notch filter frequency,
|
||||
223 0x0DE nchfr <1> 2 bytes 16-bit notch filter frequency,
|
||||
value is 6553.6 / kHz
|
||||
*/
|
||||
|
||||
|
@ -938,38 +959,38 @@ enum ROM_mem_e
|
|||
/*
|
||||
RS232 signal meter reading - additional comments
|
||||
|
||||
Several commercial organisations are using the AR7030 for signal monitoring
|
||||
purposes and wish to accurately log signal meter level. The information is
|
||||
given in the RS232 PROTOCOL LISTING but the subject is fairly complex. A
|
||||
summary of the required process is given here, the text has been generated by
|
||||
John Thorpe in response to a commercial request for more detailed guidance
|
||||
Several commercial organisations are using the AR7030 for signal monitoring
|
||||
purposes and wish to accurately log signal meter level. The information is
|
||||
given in the RS232 PROTOCOL LISTING but the subject is fairly complex. A
|
||||
summary of the required process is given here, the text has been generated by
|
||||
John Thorpe in response to a commercial request for more detailed guidance
|
||||
(November 2001).
|
||||
|
||||
Reading the input signal strength from the AR7030 is not too difficult, but
|
||||
Reading the input signal strength from the AR7030 is not too difficult, but
|
||||
some maths is needed to convert the level into dBm.
|
||||
|
||||
Each set is calibrated after manufacture and a set of S-meter calibration
|
||||
values stored in EEPROM in the receiver. This means that the signal strength
|
||||
Each set is calibrated after manufacture and a set of S-meter calibration
|
||||
values stored in EEPROM in the receiver. This means that the signal strength
|
||||
readings should be quite good and consistent. I think that you should get less
|
||||
than 2dB change with frequency and maybe 3dB with temperature. Initial
|
||||
than 2dB change with frequency and maybe 3dB with temperature. Initial
|
||||
calibration error should be less than +/- 2dB.
|
||||
|
||||
I think the sets that you use have been modified for DRM use have some
|
||||
changes in the IF stage. This will require that the sets are re-calibrated if
|
||||
you are to get accurate results. The SM7030 service kit has a calibration
|
||||
I think the sets that you use have been modified for DRM use have some
|
||||
changes in the IF stage. This will require that the sets are re-calibrated if
|
||||
you are to get accurate results. The SM7030 service kit has a calibration
|
||||
program (for PC) and is available from AOR.
|
||||
|
||||
The signal strength is read from the AGC voltage within the 7030 so AGC
|
||||
should be switched on and RF Gain set to maximum. To read AGC voltage send
|
||||
opcode 02EH (execute routine 14) and the receiver will return a single byte
|
||||
The signal strength is read from the AGC voltage within the 7030 so AGC
|
||||
should be switched on and RF Gain set to maximum. To read AGC voltage send
|
||||
opcode 02EH (execute routine 14) and the receiver will return a single byte
|
||||
value between 0 and 255 which is the measured AGC voltage.
|
||||
|
||||
The calibration table is stored in EEPROM, so the control software should
|
||||
read this when connection to the receiver is established and store the data
|
||||
The calibration table is stored in EEPROM, so the control software should
|
||||
read this when connection to the receiver is established and store the data
|
||||
in an array for computing.
|
||||
|
||||
Calibration data is 8 bytes long and is stored in Page2 at locations
|
||||
500 (0x01F4) to 507 (0x01FB). Use the PaGE opcode (0x52) then SRH, ADR, ADH
|
||||
Calibration data is 8 bytes long and is stored in Page2 at locations
|
||||
500 (0x01F4) to 507 (0x01FB). Use the PaGE opcode (0x52) then SRH, ADR, ADH
|
||||
to setup the address, then 8 RDD opcodes to read the data, as below :-
|
||||
|
||||
Opcode Hex Operation
|
||||
|
@ -985,8 +1006,8 @@ RDD +1 0x71 Read byte 8 of cal data
|
|||
|
||||
PGE 0 0x50 Return to page 0 for subsequent control operations
|
||||
|
||||
The first byte of calibration data holds the value of the AGC voltage for a
|
||||
signal level of -113dBm (S1). Successive bytes hold the incremental values
|
||||
The first byte of calibration data holds the value of the AGC voltage for a
|
||||
signal level of -113dBm (S1). Successive bytes hold the incremental values
|
||||
for 10dB increases in signal level :-
|
||||
|
||||
Cal data Typical Value RF signal level
|
||||
|
@ -1005,9 +1026,9 @@ byte 8 20 -23dBm (note 20dB step)
|
|||
#define STEP_SIZE_HIGH (20)
|
||||
|
||||
/*
|
||||
To calculate the signal level, table values should be subtracted from the AGC
|
||||
voltage in turn until a negative value would result. This gives the rough
|
||||
level from the table position. The accuracy can be improved by proportioning
|
||||
To calculate the signal level, table values should be subtracted from the AGC
|
||||
voltage in turn until a negative value would result. This gives the rough
|
||||
level from the table position. The accuracy can be improved by proportioning
|
||||
the remainder into the next table step. See the following example :-
|
||||
|
||||
A read signal strength operation returns a value of 100
|
||||
|
@ -1020,100 +1041,100 @@ Fine adjustment value = (remainder) / (cal byte 5) * (level step)
|
|||
= 4 / 12 * 10 = 3dB
|
||||
Signal level = -83dBm + 3dB = -80dB
|
||||
|
||||
The receiver can operate the RF attenuator automatically if the signal level
|
||||
is likely to overload the RF stages. Reading the RFAGC byte (page 0, location
|
||||
49) gives the attenuation in 10dB steps. This value should be read and added
|
||||
The receiver can operate the RF attenuator automatically if the signal level
|
||||
is likely to overload the RF stages. Reading the RFAGC byte (page 0, location
|
||||
49) gives the attenuation in 10dB steps. This value should be read and added
|
||||
to the value calculated above.
|
||||
|
||||
Further discussion has taken place on the subject of PC control with the
|
||||
Further discussion has taken place on the subject of PC control with the
|
||||
designer, the comments may be of assistance to other operators...
|
||||
|
||||
As far as I can tell all of the commands and operations work exactly as
|
||||
documented so when the client talks of "the set frequency command doesn't
|
||||
work" they are obviously doing something wrong.
|
||||
As far as I can tell all of the commands and operations work exactly as
|
||||
documented so when the client talks of "the set frequency command doesn't
|
||||
work" they are obviously doing something wrong.
|
||||
|
||||
Similarly, I am unable to duplicate the effects that they notice with
|
||||
changing audio settings after changing modes. There are some issues with the
|
||||
parameters that they are changing which I will address later, but first they
|
||||
must sort out the basic communication so that the receiver control is as
|
||||
expected. Further issues cannot really be sorted until this is working
|
||||
properly.
|
||||
Similarly, I am unable to duplicate the effects that they notice with
|
||||
changing audio settings after changing modes. There are some issues with the
|
||||
parameters that they are changing which I will address later, but first they
|
||||
must sort out the basic communication so that the receiver control is as
|
||||
expected. Further issues cannot really be sorted until this is working
|
||||
properly.
|
||||
|
||||
Programming issues...
|
||||
|
||||
Since I have no Knowledge of what programming system the client is using
|
||||
these are only general comments. The receiver control is in 8-bit binary code
|
||||
so any communication must maintain all 8 bits (and not truncate bit 7 as some
|
||||
printer outputs do).
|
||||
Since I have no Knowledge of what programming system the client is using
|
||||
these are only general comments. The receiver control is in 8-bit binary code
|
||||
so any communication must maintain all 8 bits (and not truncate bit 7 as some
|
||||
printer outputs do).
|
||||
|
||||
It is also essential that no extra characters are added to the output stream
|
||||
so check that the software is not adding carriage returns, line feeds, nulls
|
||||
or end-of-file markers to the output. If this might be a problem, monitor the
|
||||
computer to receiver communication with a serial line monitor or another
|
||||
computer running a simple RS-232 reading program.
|
||||
It is also essential that no extra characters are added to the output stream
|
||||
so check that the software is not adding carriage returns, line feeds, nulls
|
||||
or end-of-file markers to the output. If this might be a problem, monitor the
|
||||
computer to receiver communication with a serial line monitor or another
|
||||
computer running a simple RS-232 reading program.
|
||||
|
||||
There is some sample BASIC code in the "AR-7030 Computer remote control
|
||||
protocol" document which gives subroutines that cover the commonly used
|
||||
receiver settings. Use this as a starting point for your own routines. The
|
||||
published routines have been thoroughly tested and work without problems.
|
||||
There is some sample BASIC code in the "AR-7030 Computer remote control
|
||||
protocol" document which gives subroutines that cover the commonly used
|
||||
receiver settings. Use this as a starting point for your own routines. The
|
||||
published routines have been thoroughly tested and work without problems.
|
||||
|
||||
http://www.aoruk.com/pdf/comp.pdf
|
||||
http://www.aoruk.com/7030bulletin.htm#7030_rs232_s-meter
|
||||
|
||||
With all "buffered" RS-232 connections it is possible for the computer and
|
||||
receiver to get out of step when using two-way communication. For this reason
|
||||
I included some "flush input buffer" routines in the sample code. Using these
|
||||
ensures that missed characters or extra characters inserted due to noise or
|
||||
disconnection do not disrupt communication between the computer and receiver,
|
||||
With all "buffered" RS-232 connections it is possible for the computer and
|
||||
receiver to get out of step when using two-way communication. For this reason
|
||||
I included some "flush input buffer" routines in the sample code. Using these
|
||||
ensures that missed characters or extra characters inserted due to noise or
|
||||
disconnection do not disrupt communication between the computer and receiver,
|
||||
and a recovery after communications failure can be automatic.
|
||||
|
||||
Because the receiver's remote control is by direct access to memory and
|
||||
processor it is a very flexible system but is also able to disrupt receiver
|
||||
operation if incorrectly used. Only a few bytes of information stored in the
|
||||
receiver's memory affect S-meter calibration and AOR (UK) hold records of
|
||||
this data for each receiver made so that in the event of corruption it can be
|
||||
re-programmed.
|
||||
Because the receiver's remote control is by direct access to memory and
|
||||
processor it is a very flexible system but is also able to disrupt receiver
|
||||
operation if incorrectly used. Only a few bytes of information stored in the
|
||||
receiver's memory affect S-meter calibration and AOR (UK) hold records of
|
||||
this data for each receiver made so that in the event of corruption it can be
|
||||
re-programmed.
|
||||
|
||||
See the note that follows regarding AGC calibration.
|
||||
|
||||
All other working memory contents can be set to sensible values by a "Set
|
||||
defaults" operation from the front panel. Most, but not all, of the working
|
||||
memory is re-established by executing a remote "Reset" command (0x20) which
|
||||
All other working memory contents can be set to sensible values by a "Set
|
||||
defaults" operation from the front panel. Most, but not all, of the working
|
||||
memory is re-established by executing a remote "Reset" command (0x20) which
|
||||
can be done as a last resort after control failure.
|
||||
|
||||
Specific parameter settings...
|
||||
|
||||
The client describes the correct operations for setting mode and frequency
|
||||
but if, as he states, the set frequency command (021h) does not work then
|
||||
this needs to be investigated. This may lead to discovering the cause of
|
||||
other problems suffered by the client.
|
||||
The client describes the correct operations for setting mode and frequency
|
||||
but if, as he states, the set frequency command (021h) does not work then
|
||||
this needs to be investigated. This may lead to discovering the cause of
|
||||
other problems suffered by the client.
|
||||
|
||||
Note that changing the frequency in this way re-tunes the receiver but does
|
||||
not update the display on the front panel. A "Display frequency" command is
|
||||
Note that changing the frequency in this way re-tunes the receiver but does
|
||||
not update the display on the front panel. A "Display frequency" command is
|
||||
included for this purpose.
|
||||
|
||||
To set the receiver main volume, three locations need to be written -
|
||||
Page 0, addr 0x1e, 0x1f & 0x20. Details are in the protocol document, note the
|
||||
minimum value (for zero volume) is 15. The aux channel level change is as
|
||||
described by the client and after writing new values into the RAM will need
|
||||
either a "Set audio" command or a "Set all" command to make the change. I can
|
||||
find no reason for, nor duplicate, the effect of changing mode altering the
|
||||
aux level so this effect also needs investigating - maybe the clients "write
|
||||
To set the receiver main volume, three locations need to be written -
|
||||
Page 0, addr 0x1e, 0x1f & 0x20. Details are in the protocol document, note the
|
||||
minimum value (for zero volume) is 15. The aux channel level change is as
|
||||
described by the client and after writing new values into the RAM will need
|
||||
either a "Set audio" command or a "Set all" command to make the change. I can
|
||||
find no reason for, nor duplicate, the effect of changing mode altering the
|
||||
aux level so this effect also needs investigating - maybe the clients "write
|
||||
to memory" is writing too many locations ?
|
||||
|
||||
To initialise several receiver parameters I would recommend locking the
|
||||
receiver, writing all of the required memory data, sending a "Set all"
|
||||
command and then unlocking if required. There is no need to send individual
|
||||
"Set" commands after each parameter.
|
||||
To initialise several receiver parameters I would recommend locking the
|
||||
receiver, writing all of the required memory data, sending a "Set all"
|
||||
command and then unlocking if required. There is no need to send individual
|
||||
"Set" commands after each parameter.
|
||||
|
||||
Unless very special requirements are needed (mainly test, setup and alignment
|
||||
) the 3 rxcon locations should not be written. When a "Set all" command is
|
||||
sent these will be programmed by the receiver firmware to appropriate values
|
||||
for the mode, frequency and filters selected.
|
||||
) the 3 rxcon locations should not be written. When a "Set all" command is
|
||||
sent these will be programmed by the receiver firmware to appropriate values
|
||||
for the mode, frequency and filters selected.
|
||||
|
||||
Only the parameters that need changing need to be written, all other values
|
||||
will be maintained. The locations that the client needs to program for the
|
||||
parameters he lists are as follows:-
|
||||
Only the parameters that need changing need to be written, all other values
|
||||
will be maintained. The locations that the client needs to program for the
|
||||
parameters he lists are as follows:-
|
||||
|
||||
(all Page 0)
|
||||
frequency frequ 0x1a 0x1b 0x1c
|
||||
|
@ -1127,9 +1148,9 @@ parameters he lists are as follows:-
|
|||
RF gain rfgain 0x30 (value=0x01 for no pre-amp)
|
||||
message wbuff 0x59 (max 26 bytes)
|
||||
|
||||
If the required parameter values are unknown, I recommend setting the
|
||||
receiver as required through the front panel controls and then reading the
|
||||
value of the memory locations affected using the "read data" operation.
|
||||
If the required parameter values are unknown, I recommend setting the
|
||||
receiver as required through the front panel controls and then reading the
|
||||
value of the memory locations affected using the "read data" operation.
|
||||
|
||||
15) Sample routines (in MS QBASIC)
|
||||
|
||||
|
@ -1279,7 +1300,7 @@ read.ident:
|
|||
REM Subroutine to send frequency (Called only from other routines)
|
||||
send.freq:
|
||||
fr.val# = int(rx.freq#*376.635223+0.5) ' Convert kHz to steps
|
||||
' Exact multiplicand is
|
||||
' Exact multiplicand is
|
||||
' (2^24)/44545
|
||||
print #1,chr$(&H30+int(fr.val#/1048576));
|
||||
fr.val# = fr.val# mod 1048576 ' Write frequency as 6 hex digits
|
||||
|
@ -1310,10 +1331,10 @@ read.freq:
|
|||
*
|
||||
* AOR AR7030 receiver infrared protocol listing
|
||||
*
|
||||
* There have been two types of IR7030 infrared hand controller employed
|
||||
* by the AR7030. Late in 2005 a VERSION 2 handset (IR7030-2) was adopted
|
||||
* in production. The protocol is slightly different, so a matching CPU
|
||||
* must be employed (firmware 1xA or 1xB uses the original IR7030,
|
||||
* There have been two types of IR7030 infrared hand controller employed
|
||||
* by the AR7030. Late in 2005 a VERSION 2 handset (IR7030-2) was adopted
|
||||
* in production. The protocol is slightly different, so a matching CPU
|
||||
* must be employed (firmware 1xA or 1xB uses the original IR7030,
|
||||
* firmware 2xA or 2xB uses the later IR7030-2).
|
||||
*
|
||||
* IR7030 IR7030-2
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
|
||||
/*
|
||||
* Hamlib AOR backend - AR7030 Plus utility functions
|
||||
* Copyright (c) 2009-2010 by Larry Gadallah (VE6VQ)
|
||||
*
|
||||
* $Id: $
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -283,7 +283,7 @@ int RDD( RIG *rig, unsigned char len )
|
|||
{
|
||||
rc = -RIG_EIO;
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
rc = (int) inChr;
|
||||
}
|
||||
|
@ -407,7 +407,7 @@ int execRoutine( RIG * rig, enum ROUTINE_e rtn )
|
|||
*
|
||||
* \return RIG_OK on success, error code on failure
|
||||
*
|
||||
* Statics curPage and curAddr shadow radio's copies so that
|
||||
* Statics curPage and curAddr shadow radio's copies so that
|
||||
* page and address are only set when needed
|
||||
*/
|
||||
static int setAddr( RIG * rig, enum PAGE_e page, unsigned int addr )
|
||||
|
@ -547,7 +547,7 @@ int writeShort( RIG *rig, enum PAGE_e page, unsigned int addr, unsigned short x
|
|||
{
|
||||
int rc = -RIG_EIO;
|
||||
unsigned char v = (unsigned char) ( ( x & 0xff00 ) >> 8 );
|
||||
|
||||
|
||||
rc = writeByte( rig, page, addr, v );
|
||||
if ( RIG_OK == rc )
|
||||
{
|
||||
|
@ -573,7 +573,7 @@ int write3Bytes( RIG *rig, enum PAGE_e page, unsigned int addr, unsigned int x )
|
|||
{
|
||||
int rc = -RIG_EIO;
|
||||
unsigned char v = (unsigned char) ( ( x & 0xff0000 ) >> 16 );
|
||||
|
||||
|
||||
rc = writeByte( rig, page, addr, v );
|
||||
if ( RIG_OK == rc )
|
||||
{
|
||||
|
@ -604,7 +604,7 @@ int writeInt( RIG *rig, enum PAGE_e page, unsigned int addr, unsigned int x )
|
|||
{
|
||||
int rc = -RIG_EIO;
|
||||
unsigned char v = (unsigned char) ( ( x & 0xff000000 ) >> 24 );
|
||||
|
||||
|
||||
rc = writeByte( rig, page, addr, v );
|
||||
if ( RIG_OK == rc )
|
||||
{
|
||||
|
@ -643,7 +643,7 @@ int readByte( RIG *rig, enum PAGE_e page, unsigned int addr, unsigned char *x )
|
|||
|
||||
assert( NULL != rig );
|
||||
assert( NULL != x );
|
||||
|
||||
|
||||
rc = setAddr( rig, page, addr );
|
||||
if ( RIG_OK == rc )
|
||||
{
|
||||
|
@ -681,7 +681,7 @@ int readShort( RIG *rig, enum PAGE_e page, unsigned int addr, unsigned short *x
|
|||
|
||||
assert( NULL != rig );
|
||||
assert( NULL != x );
|
||||
|
||||
|
||||
rc = readByte( rig, page, addr, &v );
|
||||
if ( RIG_OK == rc )
|
||||
{
|
||||
|
@ -716,7 +716,7 @@ int read3Bytes( RIG *rig, enum PAGE_e page, unsigned int addr, unsigned int *x )
|
|||
|
||||
assert( NULL != rig );
|
||||
assert( NULL != x );
|
||||
|
||||
|
||||
rc = readByte( rig, page, addr, &v );
|
||||
if ( RIG_OK == rc )
|
||||
{
|
||||
|
@ -756,7 +756,7 @@ int readInt( RIG *rig, enum PAGE_e page, unsigned int addr, unsigned int *x )
|
|||
|
||||
assert( NULL != rig );
|
||||
assert( NULL != x );
|
||||
|
||||
|
||||
rc = readByte( rig, page, addr, &v );
|
||||
if ( RIG_OK == rc )
|
||||
{
|
||||
|
@ -939,10 +939,10 @@ unsigned char int2BCD( const unsigned int val )
|
|||
*
|
||||
* \return RIG_OK on success, error code on failure
|
||||
*
|
||||
* To calculate the signal level, table values should be subtracted from
|
||||
* the AGC voltage in turn until a negative value would result. This gives
|
||||
* the rough level from the table position. The accuracy can be improved by
|
||||
* proportioning the remainder into the next table step. See the following
|
||||
* To calculate the signal level, table values should be subtracted from
|
||||
* the AGC voltage in turn until a negative value would result. This gives
|
||||
* the rough level from the table position. The accuracy can be improved by
|
||||
* proportioning the remainder into the next table step. See the following
|
||||
* example :-
|
||||
*
|
||||
* A read signal strength operation returns a value of 100
|
||||
|
@ -954,10 +954,10 @@ unsigned char int2BCD( const unsigned int val )
|
|||
* Fine adjustment value = (remainder) / (cal byte 5) * (level step)
|
||||
* = 4 / 12 * 10 = 3dB
|
||||
* Signal level = -83dBm + 3dB = -80dB
|
||||
*
|
||||
* The receiver can operate the RF attenuator automatically if the signal
|
||||
* level is likely to overload the RF stages. Reading the RFAGC byte (page 0,
|
||||
* location 49) gives the attenuation in 10dB steps. This value should be
|
||||
*
|
||||
* The receiver can operate the RF attenuator automatically if the signal
|
||||
* level is likely to overload the RF stages. Reading the RFAGC byte (page 0,
|
||||
* location 49) gives the attenuation in 10dB steps. This value should be
|
||||
* read and added to the value calculated above.
|
||||
*/
|
||||
int getCalLevel( RIG * rig, unsigned char rawAgc, int *dbm )
|
||||
|
@ -978,7 +978,7 @@ int getCalLevel( RIG * rig, unsigned char rawAgc, int *dbm )
|
|||
/* calculate step size */
|
||||
if ( 0 < i )
|
||||
{
|
||||
step = rig->state.str_cal.table[ i ].val -
|
||||
step = rig->state.str_cal.table[ i ].val -
|
||||
rig->state.str_cal.table[ i - 1 ].val;
|
||||
}
|
||||
|
||||
|
@ -1083,7 +1083,7 @@ unsigned int hzToDDS( const freq_t freq )
|
|||
|
||||
rig_debug( RIG_DEBUG_VERBOSE, "%s: err[0 - 2] = %f %f %f rc 0x%08x\n",
|
||||
__func__, err[ 0 ], err[ 1 ], err[ 2 ], rc );
|
||||
|
||||
|
||||
return( rc );
|
||||
}
|
||||
|
||||
|
@ -1202,7 +1202,7 @@ rmode_t modeToHamlib( const unsigned char mode )
|
|||
break;
|
||||
};
|
||||
|
||||
rig_debug( RIG_DEBUG_VERBOSE, "%s: Native %d, Hamlib %d\n",
|
||||
rig_debug( RIG_DEBUG_VERBOSE, "%s: Native %d, Hamlib %d\n",
|
||||
__func__, mode, rc );
|
||||
|
||||
return( rc );
|
||||
|
@ -1253,7 +1253,7 @@ unsigned char modeToNative( const rmode_t mode )
|
|||
break;
|
||||
};
|
||||
|
||||
rig_debug( RIG_DEBUG_VERBOSE, "%s: Hamlib %d, native %d\n",
|
||||
rig_debug( RIG_DEBUG_VERBOSE, "%s: Hamlib %d, native %d\n",
|
||||
__func__, mode, rc );
|
||||
|
||||
return( rc );
|
||||
|
@ -1292,7 +1292,7 @@ enum agc_level_e agcToHamlib( const unsigned char agc )
|
|||
break;
|
||||
};
|
||||
|
||||
rig_debug( RIG_DEBUG_VERBOSE, "%s: Native %d, Hamlib %d\n",
|
||||
rig_debug( RIG_DEBUG_VERBOSE, "%s: Native %d, Hamlib %d\n",
|
||||
__func__, agc, rc );
|
||||
|
||||
return( rc );
|
||||
|
@ -1335,7 +1335,7 @@ unsigned char agcToNative( const enum agc_level_e agc )
|
|||
break;
|
||||
};
|
||||
|
||||
rig_debug( RIG_DEBUG_VERBOSE, "%s: Hamlib %d, native %d\n",
|
||||
rig_debug( RIG_DEBUG_VERBOSE, "%s: Hamlib %d, native %d\n",
|
||||
__func__, agc, rc );
|
||||
|
||||
return( rc );
|
||||
|
|
25
aor/ar8000.c
25
aor/ar8000.c
|
@ -2,21 +2,20 @@
|
|||
* Hamlib AOR backend - AR8000 description
|
||||
* Copyright (c) 2000-2009 by Stephane Fillod
|
||||
*
|
||||
* $Id: ar8000.c,v 1.7 2008-04-11 17:10:45 fillods 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
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -138,7 +137,7 @@ const struct rig_caps ar8000_caps = {
|
|||
{AR8000_MODES,kHz(200)},
|
||||
{AR8000_MODES,kHz(250)},
|
||||
{AR8000_MODES,kHz(500)},
|
||||
#if 0
|
||||
#if 0
|
||||
{AR8000_MODES,0}, /* any tuning step */
|
||||
#endif
|
||||
RIG_TS_END,
|
||||
|
@ -146,8 +145,8 @@ const struct rig_caps ar8000_caps = {
|
|||
/* mode/filter list, .remember = order matters! */
|
||||
.filters = {
|
||||
/* mode/filter list, .remember = order matters! */
|
||||
{RIG_MODE_SSB|RIG_MODE_CW, kHz(2)},
|
||||
{RIG_MODE_FM|RIG_MODE_AM, kHz(12)},
|
||||
{RIG_MODE_SSB|RIG_MODE_CW, kHz(2)},
|
||||
{RIG_MODE_FM|RIG_MODE_AM, kHz(12)},
|
||||
{RIG_MODE_WFM, kHz(180)}, /* 50kHz at -3dB, 380kHz at -20dB */
|
||||
RIG_FLT_END,
|
||||
},
|
||||
|
|
26
aor/ar8200.c
26
aor/ar8200.c
|
@ -3,19 +3,19 @@
|
|||
* Copyright (c) 2000-2010 by Stephane Fillod
|
||||
*
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -158,7 +158,7 @@ const struct rig_caps ar8200_caps = {
|
|||
{AR8200_MODES,kHz(25)},
|
||||
{AR8200_MODES,kHz(100)},
|
||||
{AR8200_MODES,MHz(1)},
|
||||
#if 0
|
||||
#if 0
|
||||
{AR8200_MODES,0}, /* any tuning step */
|
||||
#endif
|
||||
RIG_TS_END,
|
||||
|
@ -166,11 +166,11 @@ const struct rig_caps ar8200_caps = {
|
|||
/* mode/filter list, .remember = order matters! */
|
||||
.filters = {
|
||||
/* mode/filter list, .remember = order matters! */
|
||||
{RIG_MODE_SSB|RIG_MODE_CW, kHz(3)},
|
||||
{RIG_MODE_SSB|RIG_MODE_CW, kHz(3)},
|
||||
{RIG_MODE_AM, kHz(9)},
|
||||
{RIG_MODE_AM, kHz(3)},
|
||||
{RIG_MODE_FM|RIG_MODE_AM, kHz(12)},
|
||||
{RIG_MODE_FM, kHz(9)},
|
||||
{RIG_MODE_FM|RIG_MODE_AM, kHz(12)},
|
||||
{RIG_MODE_FM, kHz(9)},
|
||||
{RIG_MODE_WFM, kHz(230)}, /* 50kHz at -3dB, 380kHz at -20dB */
|
||||
RIG_FLT_END,
|
||||
},
|
||||
|
|
26
aor/ar8600.c
26
aor/ar8600.c
|
@ -3,19 +3,19 @@
|
|||
* Copyright (c) 2000-2010 by Stephane Fillod
|
||||
*
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -160,7 +160,7 @@ const struct rig_caps ar8600_caps = {
|
|||
{AR8600_MODES,kHz(25)},
|
||||
{AR8600_MODES,kHz(100)},
|
||||
{AR8600_MODES,MHz(1)},
|
||||
#if 0
|
||||
#if 0
|
||||
{AR8600_MODES,0}, /* any tuning step */
|
||||
#endif
|
||||
RIG_TS_END,
|
||||
|
@ -169,9 +169,9 @@ const struct rig_caps ar8600_caps = {
|
|||
.filters = {
|
||||
/* mode/filter list, .remember = order matters! */
|
||||
{RIG_MODE_AM, kHz(9)},
|
||||
{RIG_MODE_SSB|RIG_MODE_CW|RIG_MODE_AM, kHz(3)},
|
||||
{RIG_MODE_FM|RIG_MODE_AM, kHz(12)},
|
||||
{RIG_MODE_FM, kHz(9)},
|
||||
{RIG_MODE_SSB|RIG_MODE_CW|RIG_MODE_AM, kHz(3)},
|
||||
{RIG_MODE_FM|RIG_MODE_AM, kHz(12)},
|
||||
{RIG_MODE_FM, kHz(9)},
|
||||
{RIG_MODE_WFM, kHz(230)}, /* 150kHz at -3dB, 380kHz at -20dB */
|
||||
RIG_FLT_END,
|
||||
},
|
||||
|
|
18
aor/sr2200.c
18
aor/sr2200.c
|
@ -5,19 +5,19 @@
|
|||
*
|
||||
* Author: Stefano Speretta, Innovative Solutions In Space BV
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue