hamlib-cvs-digest Mailing List for Ham Radio Control Libraries (Page 221)
Library to control radio transceivers and receivers
Brought to you by:
n0nb
You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(57) |
Nov
(27) |
Dec
(25) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(41) |
Feb
(101) |
Mar
(60) |
Apr
(32) |
May
(32) |
Jun
(198) |
Jul
(95) |
Aug
(60) |
Sep
(48) |
Oct
(96) |
Nov
(27) |
Dec
(222) |
2002 |
Jan
(180) |
Feb
(46) |
Mar
(68) |
Apr
(11) |
May
(36) |
Jun
(34) |
Jul
(113) |
Aug
(42) |
Sep
(71) |
Oct
(65) |
Nov
(116) |
Dec
(40) |
2003 |
Jan
(32) |
Feb
(92) |
Mar
(29) |
Apr
(102) |
May
(21) |
Jun
(34) |
Jul
(3) |
Aug
(60) |
Sep
(30) |
Oct
(62) |
Nov
(57) |
Dec
(33) |
2004 |
Jan
(28) |
Feb
(46) |
Mar
(16) |
Apr
(14) |
May
(31) |
Jun
(21) |
Jul
(10) |
Aug
(80) |
Sep
(42) |
Oct
(11) |
Nov
(28) |
Dec
(13) |
2005 |
Jan
(35) |
Feb
(26) |
Mar
(20) |
Apr
(118) |
May
(2) |
Jun
(5) |
Jul
|
Aug
|
Sep
(5) |
Oct
(1) |
Nov
(13) |
Dec
(1) |
2006 |
Jan
(9) |
Feb
(25) |
Mar
(22) |
Apr
(6) |
May
|
Jun
|
Jul
(2) |
Aug
(1) |
Sep
(3) |
Oct
(46) |
Nov
(13) |
Dec
(7) |
2007 |
Jan
(9) |
Feb
(14) |
Mar
(3) |
Apr
|
May
(6) |
Jun
(1) |
Jul
|
Aug
(11) |
Sep
(7) |
Oct
(8) |
Nov
(41) |
Dec
(3) |
2008 |
Jan
(27) |
Feb
(16) |
Mar
(13) |
Apr
(23) |
May
(39) |
Jun
(4) |
Jul
(7) |
Aug
(1) |
Sep
(13) |
Oct
(52) |
Nov
(44) |
Dec
(55) |
2009 |
Jan
(72) |
Feb
(69) |
Mar
|
Apr
|
May
|
Jun
(13) |
Jul
(1) |
Aug
(6) |
Sep
(15) |
Oct
(11) |
Nov
(31) |
Dec
(20) |
2010 |
Jan
(24) |
Feb
(21) |
Mar
(22) |
Apr
(40) |
May
(38) |
Jun
(4) |
Jul
(2) |
Aug
(22) |
Sep
(19) |
Oct
(14) |
Nov
(5) |
Dec
(8) |
2011 |
Jan
(14) |
Feb
(36) |
Mar
(6) |
Apr
|
May
|
Jun
(23) |
Jul
(13) |
Aug
(8) |
Sep
(7) |
Oct
|
Nov
(3) |
Dec
(9) |
2012 |
Jan
(17) |
Feb
(13) |
Mar
(10) |
Apr
|
May
(1) |
Jun
(14) |
Jul
(4) |
Aug
(12) |
Sep
(2) |
Oct
(24) |
Nov
(14) |
Dec
(2) |
2013 |
Jan
(4) |
Feb
(3) |
Mar
(3) |
Apr
(3) |
May
(10) |
Jun
(4) |
Jul
(7) |
Aug
|
Sep
(15) |
Oct
(5) |
Nov
(1) |
Dec
(2) |
2014 |
Jan
|
Feb
(8) |
Mar
(1) |
Apr
(3) |
May
(1) |
Jun
|
Jul
|
Aug
(1) |
Sep
(3) |
Oct
(7) |
Nov
(6) |
Dec
(3) |
2015 |
Jan
(4) |
Feb
(5) |
Mar
(8) |
Apr
(8) |
May
(2) |
Jun
|
Jul
(4) |
Aug
(7) |
Sep
(8) |
Oct
|
Nov
(6) |
Dec
(4) |
2016 |
Jan
(6) |
Feb
(26) |
Mar
(3) |
Apr
(10) |
May
(6) |
Jun
(5) |
Jul
(1) |
Aug
(4) |
Sep
(3) |
Oct
(4) |
Nov
(3) |
Dec
(10) |
2017 |
Jan
(11) |
Feb
(11) |
Mar
(2) |
Apr
(1) |
May
(7) |
Jun
(2) |
Jul
(11) |
Aug
(9) |
Sep
(5) |
Oct
(5) |
Nov
(1) |
Dec
(2) |
2018 |
Jan
(5) |
Feb
(2) |
Mar
(19) |
Apr
(7) |
May
(11) |
Jun
(3) |
Jul
(4) |
Aug
(10) |
Sep
(2) |
Oct
(8) |
Nov
(6) |
Dec
(9) |
2019 |
Jan
(9) |
Feb
(6) |
Mar
(2) |
Apr
(4) |
May
(6) |
Jun
(9) |
Jul
(6) |
Aug
(3) |
Sep
(5) |
Oct
(2) |
Nov
(8) |
Dec
(9) |
2020 |
Jan
(15) |
Feb
(1) |
Mar
(18) |
Apr
(33) |
May
(43) |
Jun
(87) |
Jul
(45) |
Aug
(8) |
Sep
(43) |
Oct
(3) |
Nov
(5) |
Dec
(42) |
2021 |
Jan
(116) |
Feb
(40) |
Mar
(58) |
Apr
(48) |
May
(29) |
Jun
(2) |
Jul
|
Aug
(22) |
Sep
(18) |
Oct
(1) |
Nov
|
Dec
(3) |
2022 |
Jan
(1) |
Feb
(1) |
Mar
|
Apr
(1) |
May
(2) |
Jun
(1) |
Jul
|
Aug
(1) |
Sep
|
Oct
(6) |
Nov
(2) |
Dec
(9) |
2023 |
Jan
(10) |
Feb
|
Mar
|
Apr
(10) |
May
(3) |
Jun
(1) |
Jul
(2) |
Aug
(4) |
Sep
(1) |
Oct
|
Nov
(2) |
Dec
(3) |
2024 |
Jan
(4) |
Feb
(1) |
Mar
(2) |
Apr
(2) |
May
(5) |
Jun
(3) |
Jul
(1) |
Aug
(2) |
Sep
|
Oct
(2) |
Nov
(3) |
Dec
(9) |
2025 |
Jan
(5) |
Feb
(5) |
Mar
|
Apr
(10) |
May
(20) |
Jun
(43) |
Jul
(24) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Stephane F. <f4...@us...> - 2001-01-03 23:10:16
|
Update of /cvsroot/hamlib/hamlib In directory usw-pr-cvs1:/tmp/cvs-serv6771 Modified Files: Makefile.am Log Message: * added kenwood/ subdirectory Index: Makefile.am =================================================================== RCS file: /cvsroot/hamlib/hamlib/Makefile.am,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** Makefile.am 2000/12/16 15:13:20 1.4 --- Makefile.am 2001/01/03 23:10:15 1.5 *************** *** 1,2 **** ! EXTRA_DIST = COPYING INSTALL PLAN README THANKS TODO ! SUBDIRS = include src icom ft747 ft847 aor tests doc --- 1,5 ---- ! EXTRA_DIST = PLAN TODO ! SUBDIRS = include src icom ft747 ft847 kenwood aor tests doc ! ! hamlibdoc_DATA = ChangeLog COPYING NEWS THANKS INSTALL README LICENSE ! |
From: Frank S. <vk...@ix...> - 2000-12-27 06:16:18
|
Hi hamlib crew, Just wanted to wish you all a very nice holiday season and great 2001 . Looking forward to improving hamlib beyond our expectations :-) 73's de Frank (vk3fcs/km5ws). |
From: Frank S. <vk...@ix...> - 2000-12-22 05:39:08
|
Hi, I opened a ticket on syncmail. It no longer complains when doing "cvs ci",but for some reason mail is not ending up on the list. But, there is definitely activity in the CVS archives :-) Be patient ;-) Cheers / Frank |
From: Frank S. <jav...@us...> - 2000-12-13 01:27:46
|
Update of /cvsroot/hamlib/hamlib/tests In directory slayer.i.sourceforge.net:/tmp/cvs-serv1889 Modified Files: testrig.c Log Message: Added some new freq/mode combinations. Index: testrig.c =================================================================== RCS file: /cvsroot/hamlib/hamlib/tests/testrig.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** testrig.c 2000/12/09 21:50:09 1.7 --- testrig.c 2000/12/13 01:27:43 1.8 *************** *** 70,90 **** /* ! * Lets try some frequencies */ retcode = rig_set_freq(my_rig, RIG_VFO_CURR, 28350125); /* 10m */ ! sleep(2); retcode = rig_set_freq(my_rig, RIG_VFO_CURR, 21235175); /* 15m */ ! sleep(2); retcode = rig_set_freq(my_rig, RIG_VFO_CURR, 770000); /* KAAM */ ! sleep(2); retcode = rig_set_freq(my_rig, RIG_VFO_CURR, 7250100); /* 40m */ ! sleep(2); retcode = rig_set_freq(my_rig, RIG_VFO_CURR, 3980000); /* 80m */ ! sleep(2); retcode = rig_set_freq(my_rig, RIG_VFO_CURR, 1875000); /* 160m */ ! sleep(2); retcode = rig_set_freq(my_rig, RIG_VFO_CURR, 14250375); /* cq de vk3fcs */ ! sleep(2); #if 0 retcode = rig_set_freq(my_rig, RIG_VFO_CURR, 145100000); /* 2m */ --- 70,132 ---- /* ! * Lets try some frequencies and modes. Return code is not checked. ! * Examples of checking return code are further down. ! * */ + /* 10m FM Narrow */ + retcode = rig_set_freq(my_rig, RIG_VFO_CURR, 28350125); /* 10m */ ! retcode = rig_set_mode(my_rig, RIG_VFO_CURR, RIG_MODE_FM, RIG_PASSBAND_NARROW); ! sleep(3); /* so you can see it -- FS */ ! ! /* 15m USB */ ! retcode = rig_set_freq(my_rig, RIG_VFO_CURR, 21235175); /* 15m */ ! retcode = rig_set_mode(my_rig, RIG_VFO_CURR, RIG_MODE_USB, RIG_PASSBAND_NORMAL); ! sleep(3); ! ! /* AM Broadcast band */ ! retcode = rig_set_freq(my_rig, RIG_VFO_CURR, 770000); /* KAAM */ ! retcode = rig_set_mode(my_rig, RIG_VFO_CURR, RIG_MODE_AM, RIG_PASSBAND_NORMAL); ! sleep(3); ! ! /* 40m LSB */ ! retcode = rig_set_freq(my_rig, RIG_VFO_CURR, 7250100); /* 40m */ ! retcode = rig_set_mode(my_rig, RIG_VFO_CURR, RIG_MODE_LSB, RIG_PASSBAND_NORMAL); ! sleep(3); ! ! /* 80m AM NArrow */ ! retcode = rig_set_freq(my_rig, RIG_VFO_CURR, 3980000); /* 80m */ ! retcode = rig_set_mode(my_rig, RIG_VFO_CURR, RIG_MODE_AM, RIG_PASSBAND_NARROW); ! sleep(3); ! ! /* 160m CW Normal */ ! retcode = rig_set_freq(my_rig, RIG_VFO_CURR, 1875000); /* 160m */ ! retcode = rig_set_mode(my_rig, RIG_VFO_CURR, RIG_MODE_CW, RIG_PASSBAND_NORMAL); ! sleep(3); ! ! /* 160m CW Narrow -- The band is noisy tonight -- FS*/ ! ! retcode = rig_set_mode(my_rig, RIG_VFO_CURR, RIG_MODE_CW, RIG_PASSBAND_NARROW); ! sleep(3); ! ! /* 20m USB on VFO_A */ ! ! retcode = rig_set_vfo(my_rig, RIG_VFO_A); retcode = rig_set_freq(my_rig, RIG_VFO_CURR, 14250375); /* cq de vk3fcs */ ! sleep(3); ! ! /* 20m USB on VFO_A , with only 1 call */ ! ! retcode = rig_set_freq(my_rig, RIG_VFO_A, 14295125); /* cq de vk3fcs */ ! sleep(3); ! ! ! #if 0 retcode = rig_set_freq(my_rig, RIG_VFO_CURR, 145100000); /* 2m */ |
From: Frank S. <jav...@us...> - 2000-12-13 01:26:11
|
Update of /cvsroot/hamlib/hamlib/ft747 In directory slayer.i.sourceforge.net:/tmp/cvs-serv1565 Modified Files: ft747.c ft747.h Log Message: Removed static stuff from functions. Also, begin to implement table driven command translation from API to rig native. priv now contains a cmd table that is used for backend commands towards rig. Index: ft747.c =================================================================== RCS file: /cvsroot/hamlib/hamlib/ft747/ft747.c,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -r1.25 -r1.26 *** ft747.c 2000/12/11 04:19:10 1.25 --- ft747.c 2000/12/13 01:26:08 1.26 *************** *** 28,32 **** - /* * TODO - FS --- 28,31 ---- *************** *** 63,70 **** /* rig instance will copy from these and modify if required . */ /* Complete sequences (1) can be read and used directly as a cmd sequence . */ ! /* Incomplete sequences (0) must be copied to priv data and completed */ ! /* there. */ ! static const struct ft747_cmd_set ncmd[] = { { 1, { 0x00, 0x00, 0x00, 0x00, 0x01 } }, /* split = off */ { 1, { 0x00, 0x00, 0x00, 0x01, 0x01 } }, /* split = on */ --- 62,69 ---- /* rig instance will copy from these and modify if required . */ /* Complete sequences (1) can be read and used directly as a cmd sequence . */ ! /* Incomplete sequences (0) must be completed with extra parameters */ ! /* eg: mem number, or freq etc.. */ ! static const ft747_cmd_set_t ncmd[] = { { 1, { 0x00, 0x00, 0x00, 0x00, 0x01 } }, /* split = off */ { 1, { 0x00, 0x00, 0x00, 0x01, 0x01 } }, /* split = on */ *************** *** 219,226 **** rig_debug(RIG_DEBUG_VERBOSE,"ft747:ft747_init called \n"); ! /* init the priv_data from static struct ! * + override with rig-specific preferences */ ! /* TODO: read pacing from preferences */ --- 218,226 ---- rig_debug(RIG_DEBUG_VERBOSE,"ft747:ft747_init called \n"); ! /* ! * Copy native cmd set to private cmd storage area */ ! ! memcpy(p->pcs,ncmd,sizeof(ncmd)); /* TODO: read pacing from preferences */ *************** *** 303,316 **** struct rig_state *rig_s; struct ft747_priv_data *p; ! ! static unsigned char cmd[] = { 0x00, 0x00, 0x00, 0x00, 0x0a }; /* set freq */ ! static unsigned char bcd[] = { 0,0,0,0 }; /* set freq */ ! ! int i; if (!rig) return -RIG_EINVAL; ! p = (struct ft747_priv_data*)rig->state.priv; rig_s = &rig->state; --- 303,314 ---- struct rig_state *rig_s; struct ft747_priv_data *p; ! unsigned char *cmd; /* points to sequence to send */ if (!rig) return -RIG_EINVAL; ! ! p = (struct ft747_priv_data*)rig->state.priv; + rig_s = &rig->state; *************** *** 319,337 **** ft747_set_vfo(rig, vfo); /* select VFO first , new API */ - to_bcd(bcd,freq,8); ! dump_hex(bcd,4); /* just checking */ ! rig_debug(RIG_DEBUG_VERBOSE,"ft747: requested freq after conversion = %Li Hz \n", from_bcd(bcd,8)); ! to_bcd(bcd,freq/10,8); /* must pass as multiple of 10 Hz to ft747 yuk , see TODO -- FS*/ ! for(i=0; i<4; i++) { ! cmd[i] = bcd[i]; /* add bcd coded freq to cmd */ ! } write_block(rig_s->fd, cmd, FT747_CMD_LENGTH, rig_s->write_delay, rig_s->post_write_delay); - return RIG_OK; } --- 317,335 ---- ft747_set_vfo(rig, vfo); /* select VFO first , new API */ ! /* ! * Copy native cmd freq_set to private cmd storage area ! */ ! memcpy(&p->p_cmd,&ncmd[FT_747_NATIVE_FREQ_SET].nseq,FT747_CMD_LENGTH); ! to_bcd(p->p_cmd,freq/10,8); /* store bcd format in in p_cmd */ ! /* TODO -- fix 10Hz resolution -- FS */ ! rig_debug(RIG_DEBUG_VERBOSE,"ft747: requested freq after conversion = %Li Hz \n", from_bcd(p->p_cmd,8)* 10 ); + cmd = p->p_cmd; /* get native sequence */ write_block(rig_s->fd, cmd, FT747_CMD_LENGTH, rig_s->write_delay, rig_s->post_write_delay); return RIG_OK; } *************** *** 383,390 **** struct rig_state *rig_s; struct ft747_priv_data *p; ! ! unsigned char mymode; /* ft747 mode value */ ! ! static unsigned char cmd[] = { 0x00, 0x00, 0x00, 0x00, 0x0c }; /* mode set */ if (!rig) --- 381,386 ---- struct rig_state *rig_s; struct ft747_priv_data *p; ! unsigned char *cmd; /* points to sequence to send */ ! unsigned char cmd_index; /* index of sequence to send */ if (!rig) *************** *** 404,422 **** switch(mode) { case RIG_MODE_AM: ! mymode = MODE_SET_AMW; break; case RIG_MODE_CW: ! mymode = MODE_SET_CWW; break; case RIG_MODE_USB: ! mymode = MODE_SET_USB; break; case RIG_MODE_LSB: ! mymode = MODE_SET_LSB; break; case RIG_MODE_FM: ! mymode = MODE_SET_FMW; break; - default: return -RIG_EINVAL; /* sorry, wrong MODE */ --- 400,417 ---- switch(mode) { case RIG_MODE_AM: ! cmd_index = FT_747_NATIVE_MODE_SET_AMW; break; case RIG_MODE_CW: ! cmd_index = FT_747_NATIVE_MODE_SET_CWW; break; case RIG_MODE_USB: ! cmd_index = FT_747_NATIVE_MODE_SET_USB; break; case RIG_MODE_LSB: ! cmd_index = FT_747_NATIVE_MODE_SET_LSB; break; case RIG_MODE_FM: ! cmd_index = FT_747_NATIVE_MODE_SET_FMW; break; default: return -RIG_EINVAL; /* sorry, wrong MODE */ *************** *** 429,445 **** switch(width) { ! case RIG_PASSBAND_NORMAL: /* easy case */ break; case RIG_PASSBAND_NARROW: /* must set narrow */ ! mymode |= MODE_NAR; break; - case RIG_PASSBAND_WIDE: - return -RIG_EINVAL; /* sorry, wrong WIDTH */ } ! cmd[3] = mymode; write_block(rig_s->fd, cmd, FT747_CMD_LENGTH, rig_s->write_delay, rig_s->post_write_delay); ! rig_debug(RIG_DEBUG_VERBOSE,"ft747: rig specific mode = %x \n", mymode); return RIG_OK; /* good */ --- 424,461 ---- switch(width) { ! case RIG_PASSBAND_NORMAL: /* easy case , no change to native sequence */ break; + + case RIG_PASSBAND_WIDE: + return -RIG_EINVAL; /* sorry, WIDE WIDTH is not supported */ + case RIG_PASSBAND_NARROW: /* must set narrow */ ! switch(mode) { ! case RIG_MODE_AM: ! cmd_index = FT_747_NATIVE_MODE_SET_AMN; ! break; ! case RIG_MODE_FM: ! cmd_index = FT_747_NATIVE_MODE_SET_FMN; ! break; ! case RIG_MODE_CW: ! cmd_index = FT_747_NATIVE_MODE_SET_CWN; ! break; ! default: ! return -RIG_EINVAL; /* sorry, wrong MODE/WIDTH combo */ ! } break; + default: + return -RIG_EINVAL; /* sorry, wrong WIDTH requested */ } + + /* + * phew! now send cmd to rig + */ ! cmd = (unsigned char *) p->pcs[cmd_index].nseq; /* get native sequence */ write_block(rig_s->fd, cmd, FT747_CMD_LENGTH, rig_s->write_delay, rig_s->post_write_delay); ! ! rig_debug(RIG_DEBUG_VERBOSE,"ft747: cmd_index = %i \n", cmd_index); return RIG_OK; /* good */ *************** *** 460,464 **** mymode = p->update_data[FT747_SUMO_DISPLAYED_MODE]; ! mymode = mymode & MODE_MASK; /* mask out bits 5 and 6 */ rig_debug(RIG_DEBUG_VERBOSE,"ft747: mymode = %x \n", mymode); --- 476,480 ---- mymode = p->update_data[FT747_SUMO_DISPLAYED_MODE]; ! mymode &= MODE_MASK; /* mask out bits 5 and 6 */ rig_debug(RIG_DEBUG_VERBOSE,"ft747: mymode = %x \n", mymode); *************** *** 509,514 **** struct rig_state *rig_s; struct ft747_priv_data *p; - static unsigned char cmd[] = { 0x00, 0x00, 0x00, 0x00, 0x05 }; /* select vfo A/B/Current */ if (!rig) return -RIG_EINVAL; --- 525,533 ---- struct rig_state *rig_s; struct ft747_priv_data *p; + unsigned char *cmd; /* points to sequence to send */ + unsigned char cmd_index; /* index of sequence to send */ + + if (!rig) return -RIG_EINVAL; *************** *** 525,556 **** switch(vfo) { case RIG_VFO_A: ! cmd[3] = FT747_VFO_A; ! write_block(rig_s->fd, cmd, FT747_CMD_LENGTH, rig_s->write_delay, rig_s->post_write_delay); p->current_vfo = vfo; /* update active VFO */ ! return RIG_OK; case RIG_VFO_B: ! cmd[3] = FT747_VFO_B; ! write_block(rig_s->fd, cmd, FT747_CMD_LENGTH, rig_s->write_delay, rig_s->post_write_delay); p->current_vfo = vfo; /* update active VFO */ ! return RIG_OK; case RIG_VFO_CURR: switch(p->current_vfo) { /* what is my active VFO ? */ case RIG_VFO_A: ! cmd[3] = FT747_VFO_A; ! write_block(rig_s->fd, cmd, FT747_CMD_LENGTH, rig_s->write_delay, rig_s->post_write_delay); ! return RIG_OK; case RIG_VFO_B: ! cmd[3] = FT747_VFO_B; ! write_block(rig_s->fd, cmd, FT747_CMD_LENGTH, rig_s->write_delay, rig_s->post_write_delay); ! return RIG_OK; default: rig_debug(RIG_DEBUG_VERBOSE,"ft747: Unknown default VFO \n"); ! return -RIG_EINVAL; /* sorry, wrong VFO */ } ! default: return -RIG_EINVAL; /* sorry, wrong VFO */ } } --- 544,582 ---- switch(vfo) { case RIG_VFO_A: ! cmd_index = FT_747_NATIVE_VFO_A; p->current_vfo = vfo; /* update active VFO */ ! break; case RIG_VFO_B: ! cmd_index = FT_747_NATIVE_VFO_B; p->current_vfo = vfo; /* update active VFO */ ! break; case RIG_VFO_CURR: switch(p->current_vfo) { /* what is my active VFO ? */ case RIG_VFO_A: ! cmd_index = FT_747_NATIVE_VFO_A; ! break; case RIG_VFO_B: ! cmd_index = FT_747_NATIVE_VFO_B; ! break; default: rig_debug(RIG_DEBUG_VERBOSE,"ft747: Unknown default VFO \n"); ! return -RIG_EINVAL; /* sorry, wrong current VFO */ } ! ! break; ! default: return -RIG_EINVAL; /* sorry, wrong VFO */ } + + /* + * phew! now send cmd to rig + */ + + cmd = (unsigned char *) p->pcs[cmd_index].nseq; /* get native sequence */ + write_block(rig_s->fd, cmd, FT747_CMD_LENGTH, rig_s->write_delay, rig_s->post_write_delay); + return RIG_OK; + } *************** *** 592,595 **** --- 618,623 ---- struct ft747_priv_data *p; unsigned char *cmd; /* points to sequence to send */ + unsigned char cmd_index; /* index of sequence to send */ + if (!rig) *************** *** 604,611 **** switch(ptt) { case RIG_PTT_OFF: ! cmd = (unsigned char *)&ncmd[FT_747_NATIVE_MODE_PTT_OFF].nseq; /* get native sequence */ break; case RIG_PTT_ON: ! cmd = (unsigned char *)&ncmd[FT_747_NATIVE_MODE_PTT_ON].nseq; break; default: --- 632,639 ---- switch(ptt) { case RIG_PTT_OFF: ! cmd_index = FT_747_NATIVE_PTT_OFF; break; case RIG_PTT_ON: ! cmd_index = FT_747_NATIVE_PTT_ON; break; default: *************** *** 613,617 **** --- 641,651 ---- } + /* + * phew! now send cmd to rig + */ + + cmd = (unsigned char *) p->pcs[cmd_index].nseq; /* get native sequence */ write_block(rig_s->fd, cmd, FT747_CMD_LENGTH, rig_s->write_delay, rig_s->post_write_delay); + return RIG_OK; /* good */ } *************** *** 854,859 **** - #endif - /* --- 888,891 ---- *************** *** 868,871 **** --- 900,906 ---- return; } + #endif + + Index: ft747.h =================================================================== RCS file: /cvsroot/hamlib/hamlib/ft747/ft747.h,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** ft747.h 2000/12/11 04:19:10 1.18 --- ft747.h 2000/12/13 01:26:08 1.19 *************** *** 95,102 **** FT_747_NATIVE_MODE_SET_FMW, FT_747_NATIVE_MODE_SET_FMN, ! FT_747_NATIVE_MODE_PACING, ! FT_747_NATIVE_MODE_PTT_OFF, ! FT_747_NATIVE_MODE_PTT_ON, ! FT_747_NATIVE_MODE_UPDATE }; --- 95,104 ---- FT_747_NATIVE_MODE_SET_FMW, FT_747_NATIVE_MODE_SET_FMN, ! FT_747_NATIVE_PACING, ! FT_747_NATIVE_PTT_OFF, ! FT_747_NATIVE_PTT_ON, ! FT_747_NATIVE_UPDATE, ! FT_747_NATIVE_SIZE /* end marker, value indicates number of */ ! /* native cmd entries */ }; *************** *** 106,110 **** /* ! * Data structure for FT747 native cmd set */ --- 108,112 ---- /* ! * Basic Data structure for FT747 native cmd set */ *************** *** 114,173 **** }; ! /* typedef struct ft747_cmd_set ft747_cmd_set_t; */ - #if 0 - #define FT_747_NATIVE_SPLIT_OFF 0 - #define FT_747_NATIVE_SPLIT_ON 1 - #define FT_747_NATIVE_RECALL_MEM 2 - #define FT_747_NATIVE_VFO_TO_MEM 3 - #define FT_747_NATIVE_DLOCK_OFF 4 - #define FT_747_NATIVE_DLOCK_ON 5 - #define FT_747_NATIVE_VFO_A 6 - #define FT_747_NATIVE_VFO_B 7 - #define FT_747_NATIVE_M_TO_VFO 9 - #define FT_747_NATIVE_UP_500K 9 - #define FT_747_NATIVE_DOWN_500K 10 - #define FT_747_NATIVE_CLARIFY_OFF 12 - #define FT_747_NATIVE_CLARIFY_ON 12 - #define FT_747_NATIVE_FREQ_SET 13 - #define FT_747_NATIVE_MODE_SET_LSB 14 - #define FT_747_NATIVE_MODE_SET_USB 15 - #define FT_747_NATIVE_MODE_SET_CWW 16 - #define FT_747_NATIVE_MODE_SET_CWN 17 - #define FT_747_NATIVE_MODE_SET_AMW 18 - #define FT_747_NATIVE_MODE_SET_AMN 19 - #define FT_747_NATIVE_MODE_SET_FMW 20 - #define FT_747_NATIVE_MODE_SET_FMN 20 - - #define FT_747_NATIVE_MODE_PACING 21 - #define FT_747_NATIVE_MODE_PTT_OFF 22 - #define FT_747_NATIVE_MODE_PTT_ON 23 - #define FT_747_NATIVE_MODE_UPDATE 24 - - - #endif - - - - - - - - - - - - - - - - - - - - - /* Internal MODES - when setting modes via cmd_mode_set() */ --- 116,123 ---- }; ! typedef struct ft747_cmd_set ft747_cmd_set_t; /* Internal MODES - when setting modes via cmd_mode_set() */ *************** *** 248,252 **** unsigned int read_update_delay; /* depends on pacing value */ unsigned char current_vfo; /* active VFO from last cmd , can be either RIG_VFO_A or RIG_VFO_B only */ ! unsigned char p_cmd[FT747_CMD_LENGTH]; /* private copy of constructed CAT cmd */ unsigned char update_data[FT747_STATUS_UPDATE_DATA_LENGTH]; /* returned data */ }; --- 198,203 ---- unsigned int read_update_delay; /* depends on pacing value */ unsigned char current_vfo; /* active VFO from last cmd , can be either RIG_VFO_A or RIG_VFO_B only */ ! unsigned char p_cmd[FT747_CMD_LENGTH]; /* private copy of 1 constructed CAT cmd */ ! ft747_cmd_set_t pcs[FT_747_NATIVE_SIZE]; /* private cmd set */ unsigned char update_data[FT747_STATUS_UPDATE_DATA_LENGTH]; /* returned data */ }; |
From: Frank S. <jav...@us...> - 2000-12-11 04:19:12
|
Update of /cvsroot/hamlib/hamlib/ft747 In directory slayer.i.sourceforge.net:/tmp/cvs-serv3455 Modified Files: ft747.c ft747.h Log Message: trying different approach to storing cmd sequence. _set_ptt is being converted. Needs tidying up though. Some sequences are complete, and can be read from static data. Incomplete sequences will eventually be copied form static declaration, and completed in priv data. Index: ft747.c =================================================================== RCS file: /cvsroot/hamlib/hamlib/ft747/ft747.c,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -r1.24 -r1.25 *** ft747.c 2000/12/09 21:48:52 1.24 --- ft747.c 2000/12/11 04:19:10 1.25 *************** *** 32,36 **** * TODO - FS * ! * 1. Rentrant code, handle static stuff * 2. rationalise code, more helper functions. * 3. Allow cached reads --- 32,36 ---- * TODO - FS * ! * 1. Rentrant code, remove static stuff from all functions. * 2. rationalise code, more helper functions. * 3. Allow cached reads *************** *** 60,64 **** --- 60,103 ---- static int ft747_get_update_data(RIG *rig); + /* Native ft747 cmd set prototypes. These are READ ONLY as each */ + /* rig instance will copy from these and modify if required . */ + /* Complete sequences (1) can be read and used directly as a cmd sequence . */ + /* Incomplete sequences (0) must be copied to priv data and completed */ + /* there. */ + + static const struct ft747_cmd_set ncmd[] = { + { 1, { 0x00, 0x00, 0x00, 0x00, 0x01 } }, /* split = off */ + { 1, { 0x00, 0x00, 0x00, 0x01, 0x01 } }, /* split = on */ + { 0, { 0x00, 0x00, 0x00, 0x00, 0x02 } }, /* recall memory*/ + { 0, { 0x00, 0x00, 0x00, 0x00, 0x03 } }, /* vfo to memory*/ + { 1, { 0x00, 0x00, 0x00, 0x00, 0x04 } }, /* dial lock = off */ + { 1, { 0x00, 0x00, 0x00, 0x01, 0x04 } }, /* dial lock = on */ + { 1, { 0x00, 0x00, 0x00, 0x00, 0x05 } }, /* select vfo A */ + { 1, { 0x00, 0x00, 0x00, 0x01, 0x05 } }, /* select vfo B */ + { 0, { 0x00, 0x00, 0x00, 0x00, 0x06 } }, /* memory to vfo*/ + { 1, { 0x00, 0x00, 0x00, 0x00, 0x07 } }, /* up 500 khz */ + { 1, { 0x00, 0x00, 0x00, 0x00, 0x08 } }, /* down 500 khz */ + { 1, { 0x00, 0x00, 0x00, 0x00, 0x09 } }, /* clarify off */ + { 1, { 0x00, 0x00, 0x00, 0x01, 0x09 } }, /* clarify on */ + { 0, { 0x00, 0x00, 0x00, 0x00, 0x0a } }, /* set freq */ + + { 1, { 0x00, 0x00, 0x00, 0x00, 0x0c } }, /* mode set LSB */ + { 1, { 0x00, 0x00, 0x00, 0x01, 0x0c } }, /* mode set USB */ + { 1, { 0x00, 0x00, 0x00, 0x02, 0x0c } }, /* mode set CWW */ + { 1, { 0x00, 0x00, 0x00, 0x03, 0x0c } }, /* mode set CWN */ + { 1, { 0x00, 0x00, 0x00, 0x04, 0x0c } }, /* mode set AMW */ + { 1, { 0x00, 0x00, 0x00, 0x05, 0x0c } }, /* mode set AMN */ + { 1, { 0x00, 0x00, 0x00, 0x06, 0x0c } }, /* mode set FMW */ + { 1, { 0x00, 0x00, 0x00, 0x07, 0x0c } }, /* mode set FMN */ + + { 0, { 0x00, 0x00, 0x00, 0x00, 0x0e } }, /* pacing set */ + { 1, { 0x00, 0x00, 0x00, 0x00, 0x0f } }, /* ptt off */ + { 1, { 0x00, 0x00, 0x00, 0x01, 0x0f } }, /* ptt on */ + { 1, { 0x00, 0x00, 0x00, 0x00, 0x10 } }, /* request update from rig */ + }; + + + /* * Receiver caps *************** *** 552,558 **** struct rig_state *rig_s; struct ft747_priv_data *p; ! ! static unsigned char cmd_ptt_off[] = { 0x00, 0x00, 0x00, 0x00, 0x0f }; /* ptt off */ ! static unsigned char cmd_ptt_on[] = { 0x00, 0x00, 0x00, 0x01, 0x0f }; /* ptt on */ if (!rig) --- 591,595 ---- struct rig_state *rig_s; struct ft747_priv_data *p; ! unsigned char *cmd; /* points to sequence to send */ if (!rig) *************** *** 564,577 **** ft747_set_vfo(rig,vfo); /* select VFO first */ switch(ptt) { case RIG_PTT_OFF: ! write_block(rig_s->fd, cmd_ptt_off, FT747_CMD_LENGTH, rig_s->write_delay, rig_s->post_write_delay); ! return RIG_OK; case RIG_PTT_ON: ! write_block(rig_s->fd, cmd_ptt_on, FT747_CMD_LENGTH, rig_s->write_delay, rig_s->post_write_delay); ! return RIG_OK; default: return -RIG_EINVAL; /* sorry, wrong VFO */ } return RIG_OK; /* good */ } --- 601,617 ---- ft747_set_vfo(rig,vfo); /* select VFO first */ + switch(ptt) { case RIG_PTT_OFF: ! cmd = (unsigned char *)&ncmd[FT_747_NATIVE_MODE_PTT_OFF].nseq; /* get native sequence */ ! break; case RIG_PTT_ON: ! cmd = (unsigned char *)&ncmd[FT_747_NATIVE_MODE_PTT_ON].nseq; ! break; default: return -RIG_EINVAL; /* sorry, wrong VFO */ } + + write_block(rig_s->fd, cmd, FT747_CMD_LENGTH, rig_s->write_delay, rig_s->post_write_delay); return RIG_OK; /* good */ } *************** *** 816,819 **** --- 856,871 ---- #endif + + /* + * Private helper cmd to copy a native cmd sequence to priv + */ + + static void build_cmd(unsigned char *dst, int command){ + int i; + for(i=0; i<FT747_CMD_LENGTH; i++) { + dst[i] = ncmd[command].nseq[i]; /* lookup native cmd and build sequence */ + } + return; + } Index: ft747.h =================================================================== RCS file: /cvsroot/hamlib/hamlib/ft747/ft747.h,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** ft747.h 2000/12/09 02:03:26 1.17 --- ft747.h 2000/12/11 04:19:10 1.18 *************** *** 66,69 **** --- 66,173 ---- + + /* + * Native FT747 functions. This is what I have to work with :-) + * + */ + + enum ft747_native_cmd_e { + FT_747_NATIVE_SPLIT_OFF = 0, + FT_747_NATIVE_SPLIT_ON, + FT_747_NATIVE_RECALL_MEM, + FT_747_NATIVE_VFO_TO_MEM, + FT_747_NATIVE_DLOCK_OFF, + FT_747_NATIVE_DLOCK_ON, + FT_747_NATIVE_VFO_A, + FT_747_NATIVE_VFO_B, + FT_747_NATIVE_M_TO_VFO, + FT_747_NATIVE_UP_500K, + FT_747_NATIVE_DOWN_500K, + FT_747_NATIVE_CLARIFY_OFF, + FT_747_NATIVE_CLARIFY_ON, + FT_747_NATIVE_FREQ_SET, + FT_747_NATIVE_MODE_SET_LSB, + FT_747_NATIVE_MODE_SET_USB, + FT_747_NATIVE_MODE_SET_CWW, + FT_747_NATIVE_MODE_SET_CWN, + FT_747_NATIVE_MODE_SET_AMW, + FT_747_NATIVE_MODE_SET_AMN, + FT_747_NATIVE_MODE_SET_FMW, + FT_747_NATIVE_MODE_SET_FMN, + FT_747_NATIVE_MODE_PACING, + FT_747_NATIVE_MODE_PTT_OFF, + FT_747_NATIVE_MODE_PTT_ON, + FT_747_NATIVE_MODE_UPDATE + + }; + + typedef enum ft747_native_cmd_e ft747_native_cmd_t; + + + /* + * Data structure for FT747 native cmd set + */ + + struct ft747_cmd_set { + unsigned char ncomp; /* 1 = complete, 0 = incomplete, needs extra info */ + unsigned char nseq[5]; /* native cmd sequence */ + }; + + /* typedef struct ft747_cmd_set ft747_cmd_set_t; */ + + #if 0 + #define FT_747_NATIVE_SPLIT_OFF 0 + #define FT_747_NATIVE_SPLIT_ON 1 + #define FT_747_NATIVE_RECALL_MEM 2 + #define FT_747_NATIVE_VFO_TO_MEM 3 + #define FT_747_NATIVE_DLOCK_OFF 4 + #define FT_747_NATIVE_DLOCK_ON 5 + #define FT_747_NATIVE_VFO_A 6 + #define FT_747_NATIVE_VFO_B 7 + + #define FT_747_NATIVE_M_TO_VFO 9 + #define FT_747_NATIVE_UP_500K 9 + #define FT_747_NATIVE_DOWN_500K 10 + #define FT_747_NATIVE_CLARIFY_OFF 12 + #define FT_747_NATIVE_CLARIFY_ON 12 + #define FT_747_NATIVE_FREQ_SET 13 + + #define FT_747_NATIVE_MODE_SET_LSB 14 + #define FT_747_NATIVE_MODE_SET_USB 15 + #define FT_747_NATIVE_MODE_SET_CWW 16 + #define FT_747_NATIVE_MODE_SET_CWN 17 + #define FT_747_NATIVE_MODE_SET_AMW 18 + #define FT_747_NATIVE_MODE_SET_AMN 19 + #define FT_747_NATIVE_MODE_SET_FMW 20 + #define FT_747_NATIVE_MODE_SET_FMN 20 + + #define FT_747_NATIVE_MODE_PACING 21 + #define FT_747_NATIVE_MODE_PTT_OFF 22 + #define FT_747_NATIVE_MODE_PTT_ON 23 + #define FT_747_NATIVE_MODE_UPDATE 24 + + + #endif + + + + + + + + + + + + + + + + + + + + + /* Internal MODES - when setting modes via cmd_mode_set() */ |
From: Frank S. <jav...@us...> - 2000-12-09 21:50:12
|
Update of /cvsroot/hamlib/hamlib/tests In directory slayer.i.sourceforge.net:/tmp/cvs-serv31118 Modified Files: testrig.c Log Message: added ptt handling example, stand back ! Index: testrig.c =================================================================== RCS file: /cvsroot/hamlib/hamlib/tests/testrig.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** testrig.c 2000/12/05 22:04:44 1.6 --- testrig.c 2000/12/09 21:50:09 1.7 *************** *** 56,60 **** /* ! * Example of setting rig Main VFO to 439.700 Mhz FM -- FS * and some error checking on the return code. */ --- 56,60 ---- /* ! * Example of setting rig paameters * and some error checking on the return code. */ *************** *** 103,106 **** --- 103,123 ---- printf("rig_set_mode: error = %s \n", rigerror(retcode)); } + + retcode = rig_set_ptt(my_rig, RIG_VFO_A, RIG_PTT_ON ); /* stand back ! */ + + if (retcode != RIG_OK ) { + printf("rig_set_ptt: error = %s \n", rigerror(retcode)); + } + + sleep(1); + + retcode = rig_set_ptt(my_rig, RIG_VFO_A, RIG_PTT_OFF ); /* phew ! */ + + if (retcode != RIG_OK ) { + printf("rig_set_ptt: error = %s \n", rigerror(retcode)); + } + + sleep(1); + /* |
From: Frank S. <jav...@us...> - 2000-12-09 21:48:56
|
Update of /cvsroot/hamlib/hamlib/ft747 In directory slayer.i.sourceforge.net:/tmp/cvs-serv31046 Modified Files: ft747.c Log Message: minor updates to active vfo handling Index: ft747.c =================================================================== RCS file: /cvsroot/hamlib/hamlib/ft747/ft747.c,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -r1.23 -r1.24 *** ft747.c 2000/12/09 02:01:59 1.23 --- ft747.c 2000/12/09 21:48:52 1.24 *************** *** 500,509 **** cmd[3] = FT747_VFO_A; write_block(rig_s->fd, cmd, FT747_CMD_LENGTH, rig_s->write_delay, rig_s->post_write_delay); - p->current_vfo = RIG_VFO_A; /* update active VFO */ return RIG_OK; case RIG_VFO_B: cmd[3] = FT747_VFO_B; write_block(rig_s->fd, cmd, FT747_CMD_LENGTH, rig_s->write_delay, rig_s->post_write_delay); - p->current_vfo = RIG_VFO_B; /* update active VFO */ return RIG_OK; default: --- 500,507 ---- *************** *** 515,518 **** --- 513,517 ---- return -RIG_EINVAL; /* sorry, wrong VFO */ } + } *************** *** 530,534 **** status = p->update_data[FT747_SUMO_DISPLAYED_STATUS]; ! status = status & SF_VFOAB; /* check VFO bit*/ rig_debug(RIG_DEBUG_VERBOSE,"ft747: vfo status = %x \n", status); --- 529,533 ---- status = p->update_data[FT747_SUMO_DISPLAYED_STATUS]; ! status &= SF_VFOAB; /* check VFO bit*/ rig_debug(RIG_DEBUG_VERBOSE,"ft747: vfo status = %x \n", status); |
From: Frank S. <jav...@us...> - 2000-12-09 02:03:30
|
Update of /cvsroot/hamlib/hamlib/ft747 In directory slayer.i.sourceforge.net:/tmp/cvs-serv20726 Modified Files: ft747.h Log Message: some new defines for FT747_VFO_A/B Index: ft747.h =================================================================== RCS file: /cvsroot/hamlib/hamlib/ft747/ft747.h,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** ft747.h 2000/12/07 02:34:56 1.16 --- ft747.h 2000/12/09 02:03:26 1.17 *************** *** 111,114 **** --- 111,120 ---- + /* + * Local VFO CMD's, according to spec + */ + + #define FT747_VFO_A 0x00 + #define FT747_VFO_B 0x01 *************** *** 137,141 **** unsigned char pacing; /* pacing value */ unsigned int read_update_delay; /* depends on pacing value */ ! unsigned char current_vfo; /* active VFO from last cmd */ unsigned char p_cmd[FT747_CMD_LENGTH]; /* private copy of constructed CAT cmd */ unsigned char update_data[FT747_STATUS_UPDATE_DATA_LENGTH]; /* returned data */ --- 143,147 ---- unsigned char pacing; /* pacing value */ unsigned int read_update_delay; /* depends on pacing value */ ! unsigned char current_vfo; /* active VFO from last cmd , can be either RIG_VFO_A or RIG_VFO_B only */ unsigned char p_cmd[FT747_CMD_LENGTH]; /* private copy of constructed CAT cmd */ unsigned char update_data[FT747_STATUS_UPDATE_DATA_LENGTH]; /* returned data */ |
From: Frank S. <jav...@us...> - 2000-12-09 02:02:03
|
Update of /cvsroot/hamlib/hamlib/ft747 In directory slayer.i.sourceforge.net:/tmp/cvs-serv20652 Modified Files: ft747.c Log Message: minor update to active VFO handling in _set_vfo Index: ft747.c =================================================================== RCS file: /cvsroot/hamlib/hamlib/ft747/ft747.c,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -r1.22 -r1.23 *** ft747.c 2000/12/07 02:34:56 1.22 --- ft747.c 2000/12/09 02:01:59 1.23 *************** *** 470,476 **** struct rig_state *rig_s; struct ft747_priv_data *p; - static unsigned char cmd[] = { 0x00, 0x00, 0x00, 0x00, 0x05 }; /* select vfo A/B/Current */ ! if (!rig) return -RIG_EINVAL; --- 470,475 ---- struct rig_state *rig_s; struct ft747_priv_data *p; static unsigned char cmd[] = { 0x00, 0x00, 0x00, 0x00, 0x05 }; /* select vfo A/B/Current */ ! if (!rig) return -RIG_EINVAL; *************** *** 484,509 **** */ switch(vfo) { case RIG_VFO_A: ! cmd[3] = 0x00; write_block(rig_s->fd, cmd, FT747_CMD_LENGTH, rig_s->write_delay, rig_s->post_write_delay); p->current_vfo = vfo; /* update active VFO */ return RIG_OK; case RIG_VFO_B: ! cmd[3] = 0x01; write_block(rig_s->fd, cmd, FT747_CMD_LENGTH, rig_s->write_delay, rig_s->post_write_delay); p->current_vfo = vfo; /* update active VFO */ return RIG_OK; case RIG_VFO_CURR: ! cmd[3] = p->current_vfo; /* use active VFO */ ! write_block(rig_s->fd, cmd, FT747_CMD_LENGTH, rig_s->write_delay, rig_s->post_write_delay); ! return RIG_OK; ! default: return -RIG_EINVAL; /* sorry, wrong VFO */ } - - - return RIG_OK; /* good */ } --- 483,518 ---- */ + switch(vfo) { case RIG_VFO_A: ! cmd[3] = FT747_VFO_A; write_block(rig_s->fd, cmd, FT747_CMD_LENGTH, rig_s->write_delay, rig_s->post_write_delay); p->current_vfo = vfo; /* update active VFO */ return RIG_OK; case RIG_VFO_B: ! cmd[3] = FT747_VFO_B; write_block(rig_s->fd, cmd, FT747_CMD_LENGTH, rig_s->write_delay, rig_s->post_write_delay); p->current_vfo = vfo; /* update active VFO */ return RIG_OK; case RIG_VFO_CURR: ! switch(p->current_vfo) { /* what is my active VFO ? */ ! case RIG_VFO_A: ! cmd[3] = FT747_VFO_A; ! write_block(rig_s->fd, cmd, FT747_CMD_LENGTH, rig_s->write_delay, rig_s->post_write_delay); ! p->current_vfo = RIG_VFO_A; /* update active VFO */ ! return RIG_OK; ! case RIG_VFO_B: ! cmd[3] = FT747_VFO_B; ! write_block(rig_s->fd, cmd, FT747_CMD_LENGTH, rig_s->write_delay, rig_s->post_write_delay); ! p->current_vfo = RIG_VFO_B; /* update active VFO */ ! return RIG_OK; ! default: ! rig_debug(RIG_DEBUG_VERBOSE,"ft747: Unknown default VFO \n"); ! return -RIG_EINVAL; /* sorry, wrong VFO */ ! } ! default: return -RIG_EINVAL; /* sorry, wrong VFO */ } } |
From: Frank S. <jav...@us...> - 2000-12-07 02:34:58
|
Update of /cvsroot/hamlib/hamlib/ft747 In directory slayer.i.sourceforge.net:/tmp/cvs-serv3967 Modified Files: ft747.c ft747.h Log Message: 1. Added VFO as target for some set/get cmds. 2. ./testrig still runs ok using RIG_VFO_CURR. Index: ft747.c =================================================================== RCS file: /cvsroot/hamlib/hamlib/ft747/ft747.c,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -r1.21 -r1.22 *** ft747.c 2000/11/25 21:49:34 1.21 --- ft747.c 2000/12/07 02:34:56 1.22 *************** *** 189,193 **** p->pacing = FT747_PACING_DEFAULT_VALUE; /* set pacing to minimum for now */ p->read_update_delay = FT747_DEFAULT_READ_TIMEOUT; /* set update timeout to safe value */ ! rig->state.priv = (void*)p; --- 189,193 ---- p->pacing = FT747_PACING_DEFAULT_VALUE; /* set pacing to minimum for now */ p->read_update_delay = FT747_DEFAULT_READ_TIMEOUT; /* set update timeout to safe value */ ! p->current_vfo = RIG_VFO_A; /* default to VFO_A ? */ rig->state.priv = (void*)p; *************** *** 261,265 **** ! int ft747_set_freq(RIG *rig, freq_t freq) { struct rig_state *rig_s; struct ft747_priv_data *p; --- 261,265 ---- ! int ft747_set_freq(RIG *rig, vfo_t vfo, freq_t freq) { struct rig_state *rig_s; struct ft747_priv_data *p; *************** *** 278,281 **** --- 278,283 ---- rig_debug(RIG_DEBUG_VERBOSE,"ft747: requested freq = %Li Hz \n", freq); + ft747_set_vfo(rig, vfo); /* select VFO first , new API */ + to_bcd(bcd,freq,8); *************** *** 293,300 **** ! return -RIG_ENIMPL; } ! int ft747_get_freq(RIG *rig, freq_t *freq) { struct ft747_priv_data *p; freq_t f; --- 295,307 ---- ! return RIG_OK; } ! ! /* ! * Return Freq for a given VFO ! */ ! ! int ft747_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) { struct ft747_priv_data *p; freq_t f; *************** *** 306,314 **** ft747_get_update_data(rig); /* get whole shebang from rig */ - - f = from_bcd_be(&(p->update_data[FT747_SUMO_DISPLAYED_FREQ+1]),8); /* grab freq and convert */ ! rig_debug(RIG_DEBUG_VERBOSE,"ft747: displayed freq = %Li Hz \n", f); (*freq) = f; /* return diplayed frequency */ --- 313,333 ---- ft747_get_update_data(rig); /* get whole shebang from rig */ ! if (vfo == RIG_VFO_CURR ) ! vfo = p->current_vfo; /* from previous vfo cmd */ + switch(vfo) { + case RIG_VFO_A: + f = from_bcd_be(&(p->update_data[FT747_SUMO_VFO_A_FREQ]),8); /* grab freq and convert */ + break; + case RIG_VFO_B: + f = from_bcd_be(&(p->update_data[FT747_SUMO_VFO_B_FREQ]),8); /* grab freq and convert */ + break; + default: + return -RIG_EINVAL; /* sorry, wrong VFO */ + } + + rig_debug(RIG_DEBUG_VERBOSE,"ft747: freq = %Li Hz for VFO = %u \n", f, vfo); + (*freq) = f; /* return diplayed frequency */ *************** *** 318,326 **** /* ! * set mode : eg AM. AMN , CW, NCW etc.. * */ ! int ft747_set_mode(RIG *rig, rmode_t mode) { struct rig_state *rig_s; struct ft747_priv_data *p; --- 337,345 ---- /* ! * set mode : eg AM, CW etc for a given VFO * */ ! int ft747_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width ) { struct rig_state *rig_s; struct ft747_priv_data *p; *************** *** 336,339 **** --- 355,359 ---- rig_s = &rig->state; + ft747_set_vfo(rig, vfo); /* select VFO first , new API */ /* *************** *** 364,367 **** --- 384,403 ---- } + + /* + * Now set width + */ + + switch(width) { + case RIG_PASSBAND_NORMAL: /* easy case */ + break; + case RIG_PASSBAND_NARROW: /* must set narrow */ + mymode |= MODE_NAR; + break; + case RIG_PASSBAND_WIDE: + return -RIG_EINVAL; /* sorry, wrong WIDTH */ + + } + cmd[3] = mymode; write_block(rig_s->fd, cmd, FT747_CMD_LENGTH, rig_s->write_delay, rig_s->post_write_delay); *************** *** 371,376 **** } ! int ft747_get_mode(RIG *rig, rmode_t *mode) { struct ft747_priv_data *p; unsigned char mymode; /* ft747 mode */ --- 407,413 ---- } + ! int ft747_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) { struct ft747_priv_data *p; unsigned char mymode; /* ft747 mode */ *************** *** 425,435 **** ! int ft747_set_vfo(RIG *rig, vfo_t vfo) { struct rig_state *rig_s; struct ft747_priv_data *p; ! static unsigned char cmd_A[] = { 0x00, 0x00, 0x00, 0x00, 0x05 }; /* select vfo A */ ! static unsigned char cmd_B[] = { 0x00, 0x00, 0x00, 0x01, 0x05 }; /* select vfo B */ if (!rig) --- 462,475 ---- ! /* ! * set vfo and store requested vfo for later RIG_VFO_CURR ! * requests. ! * ! */ int ft747_set_vfo(RIG *rig, vfo_t vfo) { struct rig_state *rig_s; struct ft747_priv_data *p; ! static unsigned char cmd[] = { 0x00, 0x00, 0x00, 0x00, 0x05 }; /* select vfo A/B/Current */ if (!rig) *************** *** 446,458 **** switch(vfo) { case RIG_VFO_A: ! write_block(rig_s->fd, cmd_A, FT747_CMD_LENGTH, rig_s->write_delay, rig_s->post_write_delay); return RIG_OK; case RIG_VFO_B: ! write_block(rig_s->fd, cmd_B, FT747_CMD_LENGTH, rig_s->write_delay, rig_s->post_write_delay); return RIG_OK; default: return -RIG_EINVAL; /* sorry, wrong VFO */ } return RIG_OK; /* good */ } --- 486,508 ---- switch(vfo) { case RIG_VFO_A: ! cmd[3] = 0x00; ! write_block(rig_s->fd, cmd, FT747_CMD_LENGTH, rig_s->write_delay, rig_s->post_write_delay); ! p->current_vfo = vfo; /* update active VFO */ return RIG_OK; case RIG_VFO_B: ! cmd[3] = 0x01; ! write_block(rig_s->fd, cmd, FT747_CMD_LENGTH, rig_s->write_delay, rig_s->post_write_delay); ! p->current_vfo = vfo; /* update active VFO */ return RIG_OK; + case RIG_VFO_CURR: + cmd[3] = p->current_vfo; /* use active VFO */ + write_block(rig_s->fd, cmd, FT747_CMD_LENGTH, rig_s->write_delay, rig_s->post_write_delay); + return RIG_OK; + default: return -RIG_EINVAL; /* sorry, wrong VFO */ } + return RIG_OK; /* good */ } *************** *** 491,495 **** } ! int ft747_set_ptt(RIG *rig, ptt_t ptt) { struct rig_state *rig_s; struct ft747_priv_data *p; --- 541,545 ---- } ! int ft747_set_ptt(RIG *rig,vfo_t vfo, ptt_t ptt) { struct rig_state *rig_s; struct ft747_priv_data *p; *************** *** 504,507 **** --- 554,559 ---- rig_s = &rig->state; + ft747_set_vfo(rig,vfo); /* select VFO first */ + switch(ptt) { case RIG_PTT_OFF: *************** *** 517,521 **** } ! int ft747_get_ptt(RIG *rig, ptt_t *ptt) { struct ft747_priv_data *p; unsigned char status; /* ft747 mode */ --- 569,573 ---- } ! int ft747_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt) { struct ft747_priv_data *p; unsigned char status; /* ft747 mode */ Index: ft747.h =================================================================== RCS file: /cvsroot/hamlib/hamlib/ft747/ft747.h,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** ft747.h 2000/11/25 21:49:34 1.15 --- ft747.h 2000/12/07 02:34:56 1.16 *************** *** 116,119 **** --- 116,121 ---- * Some useful offsets in the status update map (offset) * + * Manual appears to be full of mistakes regarding offsets etc.. -- FS + * */ *************** *** 121,124 **** --- 123,130 ---- #define FT747_SUMO_DISPLAYED_STATUS 0x00 #define FT747_SUMO_DISPLAYED_FREQ 0x01 + #define FT747_SUMO_VFO_A_FREQ 0x09 + #define FT747_SUMO_VFO_B_FREQ 0x11 + + *************** *** 131,134 **** --- 137,141 ---- unsigned char pacing; /* pacing value */ unsigned int read_update_delay; /* depends on pacing value */ + unsigned char current_vfo; /* active VFO from last cmd */ unsigned char p_cmd[FT747_CMD_LENGTH]; /* private copy of constructed CAT cmd */ unsigned char update_data[FT747_STATUS_UPDATE_DATA_LENGTH]; /* returned data */ *************** *** 144,158 **** int ft747_close(RIG *rig); ! int ft747_set_freq(RIG *rig, freq_t freq); ! int ft747_get_freq(RIG *rig, freq_t *freq); ! int ft747_set_mode(RIG *rig, rmode_t mode); /* select mode */ ! int ft747_get_mode(RIG *rig, rmode_t *mode); /* get mode */ int ft747_set_vfo(RIG *rig, vfo_t vfo); /* select vfo */ int ft747_get_vfo(RIG *rig, vfo_t *vfo); /* get vfo */ ! int ft747_set_ptt(RIG *rig, ptt_t ptt); ! int ft747_get_ptt(RIG *rig, ptt_t *ptt); --- 151,165 ---- int ft747_close(RIG *rig); ! int ft747_set_freq(RIG *rig, vfo_t vfo, freq_t freq); ! int ft747_get_freq(RIG *rig, vfo_t vfo, freq_t *freq); ! int ft747_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width); /* select mode */ ! int ft747_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width); /* get mode */ int ft747_set_vfo(RIG *rig, vfo_t vfo); /* select vfo */ int ft747_get_vfo(RIG *rig, vfo_t *vfo); /* get vfo */ ! int ft747_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt); ! int ft747_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt); |
From: Stephane F. <f4...@us...> - 2000-12-05 22:04:47
|
Update of /cvsroot/hamlib/hamlib/tests In directory slayer.i.sourceforge.net:/tmp/cvs-serv5046/tests Modified Files: rigctl.c testrig.c testtrn.c Log Message: * updates since the new API now requires a target VFO to be specified. Mainly, RIG_VFO_CURR is used, which should ensure the same behaviour of the tests programs as before. Index: rigctl.c =================================================================== RCS file: /cvsroot/hamlib/hamlib/tests/rigctl.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** rigctl.c 2000/12/04 23:39:18 1.3 --- rigctl.c 2000/12/05 22:04:44 1.4 *************** *** 206,210 **** printf("Frequency: "); scanf("%Ld", &freq); ! return rig_set_freq(rig, freq); } --- 206,210 ---- printf("Frequency: "); scanf("%Ld", &freq); ! return rig_set_freq(rig, RIG_VFO_CURR, freq); } *************** *** 214,218 **** freq_t freq; ! status = rig_get_freq(rig, &freq); printf("Frequency: %Ld\n", freq); return status; --- 214,218 ---- freq_t freq; ! status = rig_get_freq(rig, RIG_VFO_CURR, &freq); printf("Frequency: %Ld\n", freq); return status; *************** *** 228,232 **** printf("Passband: "); scanf("%d", (int*)&width); ! return rig_set_mode(rig, mode, width); } --- 228,232 ---- printf("Passband: "); scanf("%d", (int*)&width); ! return rig_set_mode(rig, RIG_VFO_CURR, mode, width); } *************** *** 238,242 **** pbwidth_t width; ! status = rig_get_mode(rig, &mode, &width); printf("Mode: %d\nPassband: %d\n", mode, width); return status; --- 238,242 ---- pbwidth_t width; ! status = rig_get_mode(rig, RIG_VFO_CURR, &mode, &width); printf("Mode: %d\nPassband: %d\n", mode, width); return status; *************** *** 271,275 **** printf("PTT: "); scanf("%d", (int*)&ptt); ! return rig_set_ptt(rig, ptt); } --- 271,275 ---- printf("PTT: "); scanf("%d", (int*)&ptt); ! return rig_set_ptt(rig, RIG_VFO_CURR, ptt); } *************** *** 280,284 **** ptt_t ptt; ! status = rig_get_ptt(rig, &ptt); printf("PTT: %d\n", ptt); return status; --- 280,284 ---- ptt_t ptt; ! status = rig_get_ptt(rig, RIG_VFO_CURR, &ptt); printf("PTT: %d\n", ptt); return status; *************** *** 292,296 **** printf("Repeater shift: "); scanf("%d", (int*)&rptr_shift); ! return rig_set_rptr_shift(rig, rptr_shift); } --- 292,296 ---- printf("Repeater shift: "); scanf("%d", (int*)&rptr_shift); ! return rig_set_rptr_shift(rig, RIG_VFO_CURR, rptr_shift); } *************** *** 301,305 **** rptr_shift_t rptr_shift; ! status = rig_get_rptr_shift(rig, &rptr_shift); printf("Repeater shift: %d\n", rptr_shift); return status; --- 301,305 ---- rptr_shift_t rptr_shift; ! status = rig_get_rptr_shift(rig, RIG_VFO_CURR, &rptr_shift); printf("Repeater shift: %d\n", rptr_shift); return status; *************** *** 313,317 **** printf("Repeater shift offset: "); scanf("%ld", &rptr_offs); ! return rig_set_rptr_offs(rig, rptr_offs); } --- 313,317 ---- printf("Repeater shift offset: "); scanf("%ld", &rptr_offs); ! return rig_set_rptr_offs(rig, RIG_VFO_CURR, rptr_offs); } *************** *** 322,326 **** unsigned long rptr_offs; ! status = rig_get_rptr_offs(rig, &rptr_offs); printf("Repeater shift offset: %ld\n", rptr_offs); return status; --- 322,326 ---- unsigned long rptr_offs; ! status = rig_get_rptr_offs(rig, RIG_VFO_CURR, &rptr_offs); printf("Repeater shift offset: %ld\n", rptr_offs); return status; *************** *** 334,338 **** printf("CTCSS tone: "); scanf("%d", &tone); ! return rig_set_ctcss(rig, tone); } --- 334,338 ---- printf("CTCSS tone: "); scanf("%d", &tone); ! return rig_set_ctcss(rig, RIG_VFO_CURR, tone); } *************** *** 343,347 **** unsigned int tone; ! status = rig_get_ctcss(rig, &tone); printf("CTCSS tone: %d\n", tone); return status; --- 343,347 ---- unsigned int tone; ! status = rig_get_ctcss(rig, RIG_VFO_CURR, &tone); printf("CTCSS tone: %d\n", tone); return status; *************** *** 355,359 **** printf("DCS code: "); scanf("%d", &code); ! return rig_set_dcs(rig, code); } --- 355,359 ---- printf("DCS code: "); scanf("%d", &code); ! return rig_set_dcs(rig, RIG_VFO_CURR, code); } *************** *** 364,368 **** unsigned int code; ! status = rig_get_dcs(rig, &code); printf("DCS code: %d\n", code); return status; --- 364,368 ---- unsigned int code; ! status = rig_get_dcs(rig, RIG_VFO_CURR, &code); printf("DCS code: %d\n", code); return status; *************** *** 378,382 **** printf("Transmit frequency: "); scanf("%Ld", &txfreq); ! return rig_set_split_freq(rig, rxfreq, txfreq); } --- 378,382 ---- printf("Transmit frequency: "); scanf("%Ld", &txfreq); ! return rig_set_split_freq(rig, RIG_VFO_CURR, rxfreq, txfreq); } *************** *** 387,391 **** freq_t rxfreq,txfreq; ! status = rig_get_split_freq(rig, &rxfreq, &txfreq); printf("Receive frequency: %Ld\n", rxfreq); printf("Transmit frequency: %Ld\n", txfreq); --- 387,391 ---- freq_t rxfreq,txfreq; ! status = rig_get_split_freq(rig, RIG_VFO_CURR, &rxfreq, &txfreq); printf("Receive frequency: %Ld\n", rxfreq); printf("Transmit frequency: %Ld\n", txfreq); *************** *** 400,404 **** printf("Split mode: "); scanf("%d", (int*)&split); ! return rig_set_split(rig, split); } --- 400,404 ---- printf("Split mode: "); scanf("%d", (int*)&split); ! return rig_set_split(rig, RIG_VFO_CURR, split); } *************** *** 409,413 **** split_t split; ! status = rig_get_split(rig, &split); printf("Split mode: %d\n", split); return status; --- 409,413 ---- split_t split; ! status = rig_get_split(rig, RIG_VFO_CURR, &split); printf("Split mode: %d\n", split); return status; *************** *** 421,425 **** printf("Tuning step: "); scanf("%ld", &ts); ! return rig_set_ts(rig, ts); } --- 421,425 ---- printf("Tuning step: "); scanf("%ld", &ts); ! return rig_set_ts(rig, RIG_VFO_CURR, ts); } *************** *** 430,434 **** unsigned long ts; ! status = rig_get_ts(rig, &ts); printf("Tuning step: %ld\n", ts); return status; --- 430,434 ---- unsigned long ts; ! status = rig_get_ts(rig, RIG_VFO_CURR, &ts); printf("Tuning step: %ld\n", ts); return status; *************** *** 485,489 **** printf("Bank: "); scanf("%d", &bank); ! return rig_set_bank(rig, bank); } --- 485,489 ---- printf("Bank: "); scanf("%d", &bank); ! return rig_set_bank(rig, RIG_VFO_CURR, bank); } *************** *** 495,499 **** printf("Memory#: "); scanf("%d", &ch); ! return rig_set_mem(rig, ch); } --- 495,499 ---- printf("Memory#: "); scanf("%d", &ch); ! return rig_set_mem(rig, RIG_VFO_CURR, ch); } *************** *** 504,508 **** int ch; ! status = rig_get_mem(rig, &ch); printf("Memory#: %d\n", ch); return status; --- 504,508 ---- int ch; ! status = rig_get_mem(rig, RIG_VFO_CURR, &ch); printf("Memory#: %d\n", ch); return status; *************** *** 516,520 **** printf("Mem/VFO op: "); scanf("%d", (int*)&op); ! return rig_mv_ctl(rig, op); } --- 516,520 ---- printf("Mem/VFO op: "); scanf("%d", (int*)&op); ! return rig_mv_ctl(rig, RIG_VFO_CURR, op); } *************** *** 538,542 **** printf("Transceive: "); scanf("%d", &trn); ! return rig_set_trn(rig, trn); } --- 538,542 ---- printf("Transceive: "); scanf("%d", &trn); ! return rig_set_trn(rig, RIG_VFO_CURR, trn); } *************** *** 547,551 **** int trn; ! status = rig_get_trn(rig, &trn); printf("Transceive: %d\n", trn); return status; --- 547,551 ---- int trn; ! status = rig_get_trn(rig, RIG_VFO_CURR, &trn); printf("Transceive: %d\n", trn); return status; Index: testrig.c =================================================================== RCS file: /cvsroot/hamlib/hamlib/tests/testrig.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** testrig.c 2000/12/05 19:32:48 1.5 --- testrig.c 2000/12/05 22:04:44 1.6 *************** *** 6,9 **** --- 6,10 ---- #include <stdio.h> #include <string.h> + #include <unistd.h> #define SERIAL_PORT "/dev/ttyS0" *************** *** 72,93 **** */ ! retcode = rig_set_freq(my_rig, 28350125); /* 10m */ sleep(2); ! retcode = rig_set_freq(my_rig, 21235175); /* 15m */ sleep(2); ! retcode = rig_set_freq(my_rig, 770000); /* KAAM */ sleep(2); ! retcode = rig_set_freq(my_rig, 7250100); /* 40m */ sleep(2); ! retcode = rig_set_freq(my_rig, 3980000); /* 80m */ sleep(2); ! retcode = rig_set_freq(my_rig, 1875000); /* 160m */ sleep(2); ! retcode = rig_set_freq(my_rig, 14250375); /* cq de vk3fcs */ sleep(2); #if 0 ! retcode = rig_set_freq(my_rig, 145100000); /* 2m */ sleep(2); ! retcode = rig_set_freq(my_rig, 435125000); /* 70cm */ sleep(2); #endif --- 73,94 ---- */ ! retcode = rig_set_freq(my_rig, RIG_VFO_CURR, 28350125); /* 10m */ sleep(2); ! retcode = rig_set_freq(my_rig, RIG_VFO_CURR, 21235175); /* 15m */ sleep(2); ! retcode = rig_set_freq(my_rig, RIG_VFO_CURR, 770000); /* KAAM */ sleep(2); ! retcode = rig_set_freq(my_rig, RIG_VFO_CURR, 7250100); /* 40m */ sleep(2); ! retcode = rig_set_freq(my_rig, RIG_VFO_CURR, 3980000); /* 80m */ sleep(2); ! retcode = rig_set_freq(my_rig, RIG_VFO_CURR, 1875000); /* 160m */ sleep(2); ! retcode = rig_set_freq(my_rig, RIG_VFO_CURR, 14250375); /* cq de vk3fcs */ sleep(2); #if 0 ! retcode = rig_set_freq(my_rig, RIG_VFO_CURR, 145100000); /* 2m */ sleep(2); ! retcode = rig_set_freq(my_rig, RIG_VFO_CURR, 435125000); /* 70cm */ sleep(2); #endif *************** *** 97,101 **** } ! retcode = rig_set_mode(my_rig, RIG_MODE_LSB, RIG_PASSBAND_NORMAL); if (retcode != RIG_OK ) { --- 98,102 ---- } ! retcode = rig_set_mode(my_rig, RIG_VFO_CURR, RIG_MODE_LSB, RIG_PASSBAND_NORMAL); if (retcode != RIG_OK ) { *************** *** 116,120 **** } ! retcode = rig_get_freq(my_rig, &freq); if (retcode == RIG_OK ) { --- 117,121 ---- } ! retcode = rig_get_freq(my_rig, RIG_VFO_CURR, &freq); if (retcode == RIG_OK ) { *************** *** 124,128 **** } ! retcode = rig_get_mode(my_rig, &rmode, &width); if (retcode == RIG_OK ) { --- 125,129 ---- } ! retcode = rig_get_mode(my_rig, RIG_VFO_CURR, &rmode, &width); if (retcode == RIG_OK ) { *************** *** 132,136 **** } ! retcode = rig_get_strength(my_rig, &strength); if (retcode == RIG_OK ) { --- 133,137 ---- } ! retcode = rig_get_strength(my_rig, RIG_VFO_CURR, &strength); if (retcode == RIG_OK ) { *************** *** 148,161 **** return 0; } - - - - - - - - - - - --- 149,151 ---- Index: testtrn.c =================================================================== RCS file: /cvsroot/hamlib/hamlib/tests/testtrn.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** testtrn.c 2000/10/08 21:20:44 1.1 --- testtrn.c 2000/12/05 22:04:44 1.2 *************** *** 10,14 **** #define SERIAL_PORT "/dev/ttyS0" ! int myfreq_event(RIG *rig, freq_t freq) { printf("Rig changed freq to %LiHz\n",freq); --- 10,14 ---- #define SERIAL_PORT "/dev/ttyS0" ! int myfreq_event(RIG *rig, vfo_t vfo, freq_t freq) { printf("Rig changed freq to %LiHz\n",freq); *************** *** 54,58 **** ! retcode = rig_set_freq(my_rig, 439700000); if (retcode != RIG_OK ) { --- 54,58 ---- ! retcode = rig_set_freq(my_rig, RIG_VFO_CURR, 439700000); if (retcode != RIG_OK ) { *************** *** 62,66 **** my_rig->callbacks.freq_event = myfreq_event; ! retcode = rig_set_trn(my_rig, RIG_TRN_ON); if (retcode != RIG_OK ) { --- 62,66 ---- my_rig->callbacks.freq_event = myfreq_event; ! retcode = rig_set_trn(my_rig, RIG_VFO_CURR, RIG_TRN_ON); if (retcode != RIG_OK ) { |
From: Stephane F. <f4...@us...> - 2000-12-05 22:01:06
|
Update of /cvsroot/hamlib/hamlib/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv3805/src Modified Files: rig.c Log Message: * all the API functions are now targetted to a particular VFO. This is a major change in the library interface, and the implementation is not complete yet (especially in the backends), but the API should be fine. Anyway, at this stage of developement, interface design experimenting matters more than completeness. * added new shortfreq_t type for frequencies on 31bits (up to 2GHz) for use by offset/shifts/etc. Index: rig.c =================================================================== RCS file: /cvsroot/hamlib/hamlib/src/rig.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** rig.c 2000/12/04 23:39:18 1.10 --- rig.c 2000/12/05 22:01:02 1.11 *************** *** 338,341 **** --- 338,342 ---- * rig_set_freq - set the frequency of the current VFO * @rig: The rig handle + * @vfo: The target VFO * @freq: The frequency to set to * *************** *** 349,353 **** */ [...1219 lines suppressed...] if (!rig || !rig->caps || !trn) --- 1746,1750 ---- * SEE ALSO: rig_set_trn() */ ! int rig_get_trn(RIG *rig, vfo_t vfo, int *trn) { if (!rig || !rig->caps || !trn) *************** *** 1718,1722 **** return -RIG_ENAVAIL; else ! return rig->caps->get_trn(rig, trn); } --- 1754,1758 ---- return -RIG_ENAVAIL; else ! return rig->caps->get_trn(rig, vfo, trn); } |
From: Stephane F. <f4...@us...> - 2000-12-05 22:01:06
|
Update of /cvsroot/hamlib/hamlib/aor In directory slayer.i.sourceforge.net:/tmp/cvs-serv3805/aor Modified Files: aor.c aor.h Log Message: * all the API functions are now targetted to a particular VFO. This is a major change in the library interface, and the implementation is not complete yet (especially in the backends), but the API should be fine. Anyway, at this stage of developement, interface design experimenting matters more than completeness. * added new shortfreq_t type for frequencies on 31bits (up to 2GHz) for use by offset/shifts/etc. Index: aor.c =================================================================== RCS file: /cvsroot/hamlib/hamlib/aor/aor.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** aor.c 2000/12/04 23:39:17 1.2 --- aor.c 2000/12/05 22:01:00 1.3 *************** *** 116,120 **** * Assumes rig!=NULL */ ! int aor_set_freq(RIG *rig, freq_t freq) { unsigned char freqbuf[16], ackbuf[16]; --- 116,120 ---- * Assumes rig!=NULL */ ! int aor_set_freq(RIG *rig, vfo_t vfo, freq_t freq) { unsigned char freqbuf[16], ackbuf[16]; *************** *** 142,146 **** * Assumes rig!=NULL, freq!=NULL */ ! int aor_get_freq(RIG *rig, freq_t *freq) { unsigned char freqbuf[16]; --- 142,146 ---- * Assumes rig!=NULL, freq!=NULL */ ! int aor_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) { unsigned char freqbuf[16]; *************** *** 160,164 **** * Assumes rig!=NULL */ ! int aor_set_mode(RIG *rig, rmode_t mode, pbwidth_t width) { unsigned char mdbuf[16],ackbuf[16]; --- 160,164 ---- * Assumes rig!=NULL */ ! int aor_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) { unsigned char mdbuf[16],ackbuf[16]; *************** *** 216,220 **** * Assumes rig!=NULL, mode!=NULL */ ! int aor_get_mode(RIG *rig, rmode_t *mode, pbwidth_t *width) { unsigned char ackbuf[16]; --- 216,220 ---- * Assumes rig!=NULL, mode!=NULL */ ! int aor_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) { unsigned char ackbuf[16]; *************** *** 265,269 **** * Assumes rig!=NULL */ ! int aor_set_ts(RIG *rig, unsigned long ts) { unsigned char tsbuf[16],ackbuf[16]; --- 265,269 ---- * Assumes rig!=NULL */ ! int aor_set_ts(RIG *rig, vfo_t vfo, shortfreq_t ts) { unsigned char tsbuf[16],ackbuf[16]; *************** *** 315,319 **** return RIG_OK; } - --- 315,318 ---- Index: aor.h =================================================================== RCS file: /cvsroot/hamlib/hamlib/aor/aor.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** aor.h 2000/12/04 23:39:17 1.2 --- aor.h 2000/12/05 22:01:00 1.3 *************** *** 32,41 **** int aor_close(RIG *rig); ! int aor_set_freq(RIG *rig, freq_t freq); ! int aor_get_freq(RIG *rig, freq_t *freq); ! int aor_set_mode(RIG *rig, rmode_t mode, pbwidth_t width); ! int aor_get_mode(RIG *rig, rmode_t *mode, pbwidth_t *width); ! int aor_set_ts(RIG *rig, unsigned long ts); int aor_set_poweroff(RIG *rig); --- 32,41 ---- int aor_close(RIG *rig); ! int aor_set_freq(RIG *rig, vfo_t vfo, freq_t freq); ! int aor_get_freq(RIG *rig, vfo_t vfo, freq_t *freq); ! int aor_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width); ! int aor_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width); ! int aor_set_ts(RIG *rig, vfo_t vfo, shortfreq_t ts); int aor_set_poweroff(RIG *rig); |
From: Stephane F. <f4...@us...> - 2000-12-05 22:01:06
|
Update of /cvsroot/hamlib/hamlib/icom In directory slayer.i.sourceforge.net:/tmp/cvs-serv3805/icom Modified Files: icom.c icom.h Log Message: * all the API functions are now targetted to a particular VFO. This is a major change in the library interface, and the implementation is not complete yet (especially in the backends), but the API should be fine. Anyway, at this stage of developement, interface design experimenting matters more than completeness. * added new shortfreq_t type for frequencies on 31bits (up to 2GHz) for use by offset/shifts/etc. Index: icom.c =================================================================== RCS file: /cvsroot/hamlib/hamlib/icom/icom.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** icom.c 2000/12/04 23:39:17 1.10 --- icom.c 2000/12/05 22:01:02 1.11 *************** *** 279,283 **** * Assumes rig!=NULL, rig->state.priv!=NULL */ ! int icom_set_freq(RIG *rig, freq_t freq) { struct icom_priv_data *priv; --- 279,283 ---- * Assumes rig!=NULL, rig->state.priv!=NULL */ ! int icom_set_freq(RIG *rig, vfo_t vfo, freq_t freq) { struct icom_priv_data *priv; *************** *** 311,315 **** * Assumes rig!=NULL, rig->state.priv!=NULL, freq!=NULL */ ! int icom_get_freq(RIG *rig, freq_t *freq) { struct icom_priv_data *priv; --- 311,315 ---- * Assumes rig!=NULL, rig->state.priv!=NULL, freq!=NULL */ ! int icom_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) { struct icom_priv_data *priv; *************** *** 355,359 **** * Assumes rig!=NULL, rig->state.priv!=NULL */ ! int icom_set_mode(RIG *rig, rmode_t mode, pbwidth_t width) { struct icom_priv_data *priv; --- 355,359 ---- * Assumes rig!=NULL, rig->state.priv!=NULL */ ! int icom_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) { struct icom_priv_data *priv; *************** *** 382,386 **** * Assumes rig!=NULL, rig->state.priv!=NULL, mode!=NULL, width!=NULL */ ! int icom_get_mode(RIG *rig, rmode_t *mode, pbwidth_t *width) { struct icom_priv_data *priv; --- 382,386 ---- * Assumes rig!=NULL, rig->state.priv!=NULL, mode!=NULL, width!=NULL */ ! int icom_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) { struct icom_priv_data *priv; *************** *** 446,450 **** * Assumes rig!=NULL, rig->state.priv!=NULL */ ! int icom_set_level(RIG *rig, setting_t level, value_t val) { return -RIG_ENIMPL; --- 446,450 ---- * Assumes rig!=NULL, rig->state.priv!=NULL */ ! int icom_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) { return -RIG_ENIMPL; *************** *** 455,459 **** * Assumes rig!=NULL, rig->state.priv!=NULL, val!=NULL */ ! int icom_get_level(RIG *rig, setting_t level, value_t *val) { struct icom_priv_data *priv; --- 455,459 ---- * Assumes rig!=NULL, rig->state.priv!=NULL, val!=NULL */ ! int icom_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) { struct icom_priv_data *priv; *************** *** 607,611 **** * Assumes rig!=NULL, rig->state.priv!=NULL */ ! int icom_set_ptt(RIG *rig, ptt_t ptt) { struct icom_priv_data *priv; --- 607,611 ---- * Assumes rig!=NULL, rig->state.priv!=NULL */ ! int icom_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt) { struct icom_priv_data *priv; *************** *** 634,638 **** * Assumes rig!=NULL, rig->state.priv!=NULL, ptt!=NULL */ ! int icom_get_ptt(RIG *rig, ptt_t *ptt) { struct icom_priv_data *priv; --- 634,638 ---- * Assumes rig!=NULL, rig->state.priv!=NULL, ptt!=NULL */ ! int icom_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt) { struct icom_priv_data *priv; *************** *** 665,669 **** * Assumes rig!=NULL, rig->state.priv!=NULL */ ! int icom_set_rptr_shift(RIG *rig, rptr_shift_t rptr_shift) { struct icom_priv_data *priv; --- 665,669 ---- * Assumes rig!=NULL, rig->state.priv!=NULL */ ! int icom_set_rptr_shift(RIG *rig, vfo_t vfo, rptr_shift_t rptr_shift) { struct icom_priv_data *priv; *************** *** 707,711 **** * Assumes rig!=NULL, rig->state.priv!=NULL, rptr_shift!=NULL */ ! int icom_get_rptr_shift(RIG *rig, rptr_shift_t *rptr_shift) { struct icom_priv_data *priv; --- 707,711 ---- * Assumes rig!=NULL, rig->state.priv!=NULL, rptr_shift!=NULL */ ! int icom_get_rptr_shift(RIG *rig, vfo_t vfo, rptr_shift_t *rptr_shift) { struct icom_priv_data *priv; *************** *** 751,755 **** * Assumes rig!=NULL, rig->state.priv!=NULL */ ! int icom_set_rptr_offs(RIG *rig, unsigned long rptr_offs) { struct icom_priv_data *priv; --- 751,755 ---- * Assumes rig!=NULL, rig->state.priv!=NULL */ ! int icom_set_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t rptr_offs) { struct icom_priv_data *priv; *************** *** 782,786 **** * Assumes rig!=NULL, rig->state.priv!=NULL, rptr_offs!=NULL */ ! int icom_get_rptr_offs(RIG *rig, unsigned long *rptr_offs) { struct icom_priv_data *priv; --- 782,786 ---- * Assumes rig!=NULL, rig->state.priv!=NULL, rptr_offs!=NULL */ ! int icom_get_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t *rptr_offs) { struct icom_priv_data *priv; *************** *** 819,830 **** * FIXME: status */ ! int icom_set_split_freq(RIG *rig, freq_t rx_freq, freq_t tx_freq) { int status; status = icom_set_vfo(rig, RIG_VFO_B); ! status |= icom_set_freq(rig, tx_freq); status |= icom_set_vfo(rig, RIG_VFO_A); ! status |= icom_set_freq(rig, rx_freq); return status; --- 819,830 ---- * FIXME: status */ ! int icom_set_split_freq(RIG *rig, vfo_t vfo, freq_t rx_freq, freq_t tx_freq) { int status; status = icom_set_vfo(rig, RIG_VFO_B); ! status |= icom_set_freq(rig, RIG_VFO_CURR, tx_freq); status |= icom_set_vfo(rig, RIG_VFO_A); ! status |= icom_set_freq(rig, RIG_VFO_CURR, rx_freq); return status; *************** *** 837,848 **** * FIXME: status */ ! int icom_get_split_freq(RIG *rig, freq_t *rx_freq, freq_t *tx_freq) { int status; status = icom_set_vfo(rig, RIG_VFO_B); ! status |= icom_get_freq(rig, tx_freq); status |= icom_set_vfo(rig, RIG_VFO_A); ! status |= icom_get_freq(rig, rx_freq); return status; --- 837,848 ---- * FIXME: status */ ! int icom_get_split_freq(RIG *rig, vfo_t vfo, freq_t *rx_freq, freq_t *tx_freq) { int status; status = icom_set_vfo(rig, RIG_VFO_B); ! status |= icom_get_freq(rig, RIG_VFO_CURR, tx_freq); status |= icom_set_vfo(rig, RIG_VFO_A); ! status |= icom_get_freq(rig, RIG_VFO_CURR, rx_freq); return status; *************** *** 853,857 **** * Assumes rig!=NULL, rig->state.priv!=NULL */ ! int icom_set_split(RIG *rig, split_t split) { struct icom_priv_data *priv; --- 853,857 ---- * Assumes rig!=NULL, rig->state.priv!=NULL */ ! int icom_set_split(RIG *rig, vfo_t vfo, split_t split) { struct icom_priv_data *priv; *************** *** 892,896 **** * Assumes rig!=NULL, rig->state.priv!=NULL, split!=NULL */ ! int icom_get_split(RIG *rig, split_t *split) { struct icom_priv_data *priv; --- 892,896 ---- * Assumes rig!=NULL, rig->state.priv!=NULL, split!=NULL */ ! int icom_get_split(RIG *rig, vfo_t vfo, split_t *split) { struct icom_priv_data *priv; *************** *** 933,937 **** * Assumes rig!=NULL, rig->state.priv!=NULL */ ! int icom_set_ts(RIG *rig, unsigned long ts) { struct icom_priv_data *priv; --- 933,937 ---- * Assumes rig!=NULL, rig->state.priv!=NULL */ ! int icom_set_ts(RIG *rig, vfo_t vfo, shortfreq_t ts) { struct icom_priv_data *priv; *************** *** 969,973 **** * Assumes rig!=NULL, rig->state.priv!=NULL, ts!=NULL */ ! int icom_get_ts(RIG *rig, unsigned long *ts) { struct icom_priv_data *priv; --- 969,973 ---- * Assumes rig!=NULL, rig->state.priv!=NULL, ts!=NULL */ ! int icom_get_ts(RIG *rig, vfo_t vfo, shortfreq_t *ts) { struct icom_priv_data *priv; *************** *** 1148,1152 **** * Assumes rig!=NULL, rig->state.priv!=NULL */ ! int icom_set_mem(RIG *rig, int ch) { struct icom_priv_data *priv; --- 1148,1152 ---- * Assumes rig!=NULL, rig->state.priv!=NULL */ ! int icom_set_mem(RIG *rig, vfo_t vfo, int ch) { struct icom_priv_data *priv; *************** *** 1175,1179 **** * Assumes rig!=NULL, rig->state.priv!=NULL */ ! int icom_set_bank(RIG *rig, int bank) { struct icom_priv_data *priv; --- 1175,1179 ---- * Assumes rig!=NULL, rig->state.priv!=NULL */ ! int icom_set_bank(RIG *rig, vfo_t vfo, int bank) { struct icom_priv_data *priv; *************** *** 1202,1206 **** * Assumes rig!=NULL, rig->state.priv!=NULL */ ! int icom_mv_ctl(RIG *rig, mv_op_t op) { struct icom_priv_data *priv; --- 1202,1206 ---- * Assumes rig!=NULL, rig->state.priv!=NULL */ ! int icom_mv_ctl(RIG *rig, vfo_t vfo, mv_op_t op) { struct icom_priv_data *priv; *************** *** 1303,1307 **** if (rig->callbacks.freq_event) { freq = from_bcd(buf+5, (priv->civ_731_mode ? 4:5)*2); ! return rig->callbacks.freq_event(rig,freq); } else return -RIG_ENAVAIL; --- 1303,1307 ---- if (rig->callbacks.freq_event) { freq = from_bcd(buf+5, (priv->civ_731_mode ? 4:5)*2); ! return rig->callbacks.freq_event(rig,RIG_VFO_CURR,freq); } else return -RIG_ENAVAIL; *************** *** 1310,1314 **** if (rig->callbacks.mode_event) { icom2hamlib_mode(buf[5]| buf[6]<<8, &mode, &width); ! return rig->callbacks.mode_event(rig,mode,width); } else return -RIG_ENAVAIL; --- 1310,1314 ---- if (rig->callbacks.mode_event) { icom2hamlib_mode(buf[5]| buf[6]<<8, &mode, &width); ! return rig->callbacks.mode_event(rig,RIG_VFO_CURR,mode,width); } else return -RIG_ENAVAIL; Index: icom.h =================================================================== RCS file: /cvsroot/hamlib/hamlib/icom/icom.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** icom.h 2000/12/04 23:39:17 1.9 --- icom.h 2000/12/05 22:01:02 1.10 *************** *** 29,35 **** #define _ICOM_H 1 struct ts_sc_list { ! unsigned long ts; /* tuning step */ unsigned char sc; /* sub command */ }; --- 29,37 ---- #define _ICOM_H 1 + #include <hamlib/rig.h> + struct ts_sc_list { ! shortfreq_t ts; /* tuning step */ unsigned char sc; /* sub command */ }; *************** *** 43,68 **** int icom_init(RIG *rig); int icom_cleanup(RIG *rig); ! int icom_set_freq(RIG *rig, freq_t freq); ! int icom_get_freq(RIG *rig, freq_t *freq); ! int icom_set_mode(RIG *rig, rmode_t mode, pbwidth_t width); ! int icom_get_mode(RIG *rig, rmode_t *mode, pbwidth_t *width); int icom_set_vfo(RIG *rig, vfo_t vfo); ! int icom_set_rptr_shift(RIG *rig, rptr_shift_t rptr_shift); ! int icom_get_rptr_shift(RIG *rig, rptr_shift_t *rptr_shift); ! int icom_set_rptr_offs(RIG *rig, unsigned long rptr_offs); ! int icom_get_rptr_offs(RIG *rig, unsigned long *rptr_offs); ! int icom_set_split_freq(RIG *rig, freq_t rx_freq, freq_t tx_freq); ! int icom_get_split_freq(RIG *rig, freq_t *rx_freq, freq_t *tx_freq); ! int icom_set_split(RIG *rig, split_t split); ! int icom_get_split(RIG *rig, split_t *split); ! int icom_set_ts(RIG *rig, unsigned long ts); ! int icom_get_ts(RIG *rig, unsigned long *ts); ! int icom_set_ptt(RIG *rig, ptt_t ptt); ! int icom_get_ptt(RIG *rig, ptt_t *ptt); ! int icom_set_bank(RIG *rig, int bank); ! int icom_set_mem(RIG *rig, int ch); ! int icom_mv_ctl(RIG *rig, mv_op_t op); ! int icom_set_level(RIG *rig, setting_t level, value_t val); ! int icom_get_level(RIG *rig, setting_t level, value_t *val); int icom_set_channel(RIG *rig, const channel_t *chan); int icom_get_channel(RIG *rig, channel_t *chan); --- 45,70 ---- int icom_init(RIG *rig); int icom_cleanup(RIG *rig); ! int icom_set_freq(RIG *rig, vfo_t vfo, freq_t freq); ! int icom_get_freq(RIG *rig, vfo_t vfo, freq_t *freq); ! int icom_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width); ! int icom_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width); int icom_set_vfo(RIG *rig, vfo_t vfo); ! int icom_set_rptr_shift(RIG *rig, vfo_t vfo, rptr_shift_t rptr_shift); ! int icom_get_rptr_shift(RIG *rig, vfo_t vfo, rptr_shift_t *rptr_shift); ! int icom_set_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t rptr_offs); ! int icom_get_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t *rptr_offs); ! int icom_set_split_freq(RIG *rig, vfo_t vfo, freq_t rx_freq, freq_t tx_freq); ! int icom_get_split_freq(RIG *rig, vfo_t vfo, freq_t *rx_freq, freq_t *tx_freq); ! int icom_set_split(RIG *rig, vfo_t vfo, split_t split); ! int icom_get_split(RIG *rig, vfo_t vfo, split_t *split); ! int icom_set_ts(RIG *rig, vfo_t vfo, shortfreq_t ts); ! int icom_get_ts(RIG *rig, vfo_t vfo, shortfreq_t *ts); ! int icom_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt); ! int icom_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt); ! int icom_set_bank(RIG *rig, vfo_t vfo, int bank); ! int icom_set_mem(RIG *rig, vfo_t vfo, int ch); ! int icom_mv_ctl(RIG *rig, vfo_t vfo, mv_op_t op); ! int icom_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val); ! int icom_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val); int icom_set_channel(RIG *rig, const channel_t *chan); int icom_get_channel(RIG *rig, channel_t *chan); |
From: Stephane F. <f4...@us...> - 2000-12-05 22:01:06
|
Update of /cvsroot/hamlib/hamlib/include/hamlib In directory slayer.i.sourceforge.net:/tmp/cvs-serv3805/include/hamlib Modified Files: rig.h Log Message: * all the API functions are now targetted to a particular VFO. This is a major change in the library interface, and the implementation is not complete yet (especially in the backends), but the API should be fine. Anyway, at this stage of developement, interface design experimenting matters more than completeness. * added new shortfreq_t type for frequencies on 31bits (up to 2GHz) for use by offset/shifts/etc. Index: rig.h =================================================================== RCS file: /cvsroot/hamlib/hamlib/include/hamlib/rig.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** rig.h 2000/12/04 23:39:17 1.10 --- rig.h 2000/12/05 22:01:03 1.11 *************** *** 143,147 **** RIG_VFO_A = RIG_VFO_MAIN, RIG_VFO_B = RIG_VFO_SUB, ! RIG_VFO_C = RIG_VFO_SAT }; --- 143,149 ---- RIG_VFO_A = RIG_VFO_MAIN, RIG_VFO_B = RIG_VFO_SUB, ! RIG_VFO_C = RIG_VFO_SAT, ! RIG_VFO_CURR, /* current VFO */ ! RIG_VFO_ALL /* apply to all VFO (when used as target) */ }; *************** *** 267,273 **** /* ! * frequency type in Hz, must be >32bits for SHF! */ typedef long long freq_t; #define Hz(f) ((freq_t)(f)) --- 269,277 ---- /* ! * freq_t: frequency type in Hz, must be >32bits for SHF! ! * shortfreq_t: frequency on 31bits, suitable for offsets, shifts, etc.. */ typedef long long freq_t; + typedef signed long shortfreq_t; #define Hz(f) ((freq_t)(f)) *************** *** 282,285 **** --- 286,290 ---- #define Watts(p) ((int)((p)*1000)) #define KW(p) ((int)((p)*1000000L)) + #define MW(p) ((int)((p)*1000000000L)) /* geeez! :) */ typedef unsigned int rmode_t; /* radio mode */ *************** *** 326,330 **** struct tuning_step_list { rmode_t modes; /* bitwise OR'ed RIG_MODE_* */ ! unsigned long ts; /* tuning step in Hz */ }; --- 331,335 ---- struct tuning_step_list { rmode_t modes; /* bitwise OR'ed RIG_MODE_* */ ! shortfreq_t ts; /* tuning step in Hz */ }; *************** *** 341,344 **** --- 346,350 ---- freq_t freq; rmode_t mode; + pbwidth_t width; vfo_t vfo; int power; /* in mW */ *************** *** 346,350 **** int preamp; /* in db */ int ant; /* antenna number */ ! unsigned long tuning_step; /* */ unsigned char channel_desc[MAXCHANDESC]; }; --- 352,356 ---- int preamp; /* in db */ int ant; /* antenna number */ ! shortfreq_t tuning_step; /* */ unsigned char channel_desc[MAXCHANDESC]; }; *************** *** 406,410 **** int (*rig_cleanup)(RIG *rig); int (*rig_open)(RIG *rig); /* called when port just opened */ ! int (*rig_close)(RIG *rig); /* called before port is to close */ int (*rig_probe)(RIG *rig); /* Experimental: may work.. */ --- 412,416 ---- int (*rig_cleanup)(RIG *rig); int (*rig_open)(RIG *rig); /* called when port just opened */ ! int (*rig_close)(RIG *rig); /* called before port is to be closed */ int (*rig_probe)(RIG *rig); /* Experimental: may work.. */ *************** *** 414,455 **** */ ! int (*set_freq)(RIG *rig, freq_t freq); /* select freq */ ! int (*get_freq)(RIG *rig, freq_t *freq); /* get freq */ ! int (*set_mode)(RIG *rig, rmode_t mode, pbwidth_t width); /* select mode */ ! int (*get_mode)(RIG *rig, rmode_t *mode, pbwidth_t *width); /* get mode */ int (*set_vfo)(RIG *rig, vfo_t vfo); /* select vfo (A,B, etc.) */ int (*get_vfo)(RIG *rig, vfo_t *vfo); /* get vfo */ ! int (*set_ptt)(RIG *rig, ptt_t ptt); /* ptt on/off */ ! int (*get_ptt)(RIG *rig, ptt_t *ptt); /* get ptt status */ ! int (*set_rptr_shift)(RIG *rig, rptr_shift_t rptr_shift); /* set repeater shift */ ! int (*get_rptr_shift)(RIG *rig, rptr_shift_t *rptr_shift); /* get repeater shift */ ! int (*set_rptr_offs)(RIG *rig, unsigned long offs);/*set duplex offset freq*/ ! int (*get_rptr_offs)(RIG *rig, unsigned long *offs);/*get duplex offset freq*/ ! int (*set_split_freq)(RIG *rig, freq_t rx_freq, freq_t tx_freq); ! int (*get_split_freq)(RIG *rig, freq_t *rx_freq, freq_t *tx_freq); ! int (*set_split)(RIG *rig, split_t split); ! int (*get_split)(RIG *rig, split_t *split); ! ! int (*set_rit)(RIG *rig, signed long rit); ! int (*get_rit)(RIG *rig, signed long *rit); ! ! int (*set_ts)(RIG *rig, unsigned long ts); /* set tuning step */ ! int (*get_ts)(RIG *rig, unsigned long *ts); /* get tuning step */ ! ! int (*set_dcs)(RIG *rig, unsigned int code); ! int (*get_dcs)(RIG *rig, unsigned int *code); ! int (*set_ctcss)(RIG *rig, unsigned int tone); ! int (*get_ctcss)(RIG *rig, unsigned int *tone); ! ! int (*set_dcs_sql)(RIG *rig, unsigned int code); ! int (*get_dcs_sql)(RIG *rig, unsigned int *code); ! int (*set_ctcss_sql)(RIG *rig, unsigned int tone); ! int (*get_ctcss_sql)(RIG *rig, unsigned int *tone); /* --- 420,461 ---- */ ! int (*set_freq)(RIG *rig, vfo_t vfo, freq_t freq); /* select freq */ ! int (*get_freq)(RIG *rig, vfo_t vfo, freq_t *freq); /* get freq */ ! int (*set_mode)(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width); /* select mode */ ! int (*get_mode)(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width); /* get mode */ int (*set_vfo)(RIG *rig, vfo_t vfo); /* select vfo (A,B, etc.) */ int (*get_vfo)(RIG *rig, vfo_t *vfo); /* get vfo */ ! int (*set_ptt)(RIG *rig, vfo_t vfo, ptt_t ptt); /* ptt on/off */ ! int (*get_ptt)(RIG *rig, vfo_t vfo, ptt_t *ptt); /* get ptt status */ ! int (*set_rptr_shift)(RIG *rig, vfo_t vfo, rptr_shift_t rptr_shift); /* set repeater shift */ ! int (*get_rptr_shift)(RIG *rig, vfo_t vfo, rptr_shift_t *rptr_shift); /* get repeater shift */ ! int (*set_rptr_offs)(RIG *rig, vfo_t vfo, shortfreq_t offs);/*set duplex offset freq*/ ! int (*get_rptr_offs)(RIG *rig, vfo_t vfo, shortfreq_t *offs);/*get duplex offset freq*/ ! int (*set_split_freq)(RIG *rig, vfo_t vfo, freq_t rx_freq, freq_t tx_freq); ! int (*get_split_freq)(RIG *rig, vfo_t vfo, freq_t *rx_freq, freq_t *tx_freq); ! int (*set_split)(RIG *rig, vfo_t vfo, split_t split); ! int (*get_split)(RIG *rig, vfo_t vfo, split_t *split); ! ! int (*set_rit)(RIG *rig, vfo_t vfo, shortfreq_t rit); ! int (*get_rit)(RIG *rig, vfo_t vfo, shortfreq_t *rit); ! ! int (*set_ts)(RIG *rig, vfo_t vfo, shortfreq_t ts); /* set tuning step */ ! int (*get_ts)(RIG *rig, vfo_t vfo, shortfreq_t *ts); /* get tuning step */ ! ! int (*set_dcs)(RIG *rig, vfo_t vfo, unsigned int code); ! int (*get_dcs)(RIG *rig, vfo_t vfo, unsigned int *code); ! int (*set_ctcss)(RIG *rig, vfo_t vfo, unsigned int tone); ! int (*get_ctcss)(RIG *rig, vfo_t vfo, unsigned int *tone); ! ! int (*set_dcs_sql)(RIG *rig, vfo_t vfo, unsigned int code); ! int (*get_dcs_sql)(RIG *rig, vfo_t vfo, unsigned int *code); ! int (*set_ctcss_sql)(RIG *rig, vfo_t vfo, unsigned int tone); ! int (*get_ctcss_sql)(RIG *rig, vfo_t vfo, unsigned int *tone); /* *************** *** 465,481 **** int (*set_poweroff)(RIG *rig); ! int (*set_level)(RIG *rig, setting_t level, value_t val);/* set level setting */ ! int (*get_level)(RIG *rig, setting_t level, value_t *val);/* set level setting*/ ! int (*set_func)(RIG *rig, setting_t func, int status); /* activate the function(s) */ ! int (*get_func)(RIG *rig, setting_t *func); /* get the setting from rig */ ! int (*set_bank)(RIG *rig, int bank); /* set memory bank number */ ! int (*set_mem)(RIG *rig, int ch); /* set memory channel number */ ! int (*get_mem)(RIG *rig, int *ch); /* get memory channel number */ ! int (*mv_ctl)(RIG *rig, mv_op_t op); /* Mem/VFO operation */ ! int (*set_trn)(RIG *rig, int trn); /* activate transceive mode on radio */ ! int (*get_trn)(RIG *rig, int *trn); /* PCR-1000 can do that, ICR75 too */ --- 471,487 ---- int (*set_poweroff)(RIG *rig); ! int (*set_level)(RIG *rig, vfo_t vfo, setting_t level, value_t val);/* set level setting */ ! int (*get_level)(RIG *rig, vfo_t vfo, setting_t level, value_t *val);/* set level setting*/ ! int (*set_func)(RIG *rig, vfo_t vfo, setting_t func, int status); /* activate the function(s) */ ! int (*get_func)(RIG *rig, vfo_t vfo, setting_t *func); /* get the setting from rig */ ! int (*set_bank)(RIG *rig, vfo_t vfo, int bank); /* set memory bank number */ ! int (*set_mem)(RIG *rig, vfo_t vfo, int ch); /* set memory channel number */ ! int (*get_mem)(RIG *rig, vfo_t vfo, int *ch); /* get memory channel number */ ! int (*mv_ctl)(RIG *rig, vfo_t vfo, mv_op_t op); /* Mem/VFO operation */ ! int (*set_trn)(RIG *rig, vfo_t vfo, int trn); /* activate transceive mode on radio */ ! int (*get_trn)(RIG *rig, vfo_t vfo, int *trn); /* PCR-1000 can do that, ICR75 too */ *************** *** 546,553 **** */ struct rig_callbacks { ! int (*freq_event)(RIG *rig, freq_t freq); ! int (*mode_event)(RIG *rig, rmode_t mode, pbwidth_t width); int (*vfo_event)(RIG *rig, vfo_t vfo); ! int (*ptt_event)(RIG *rig, ptt_t mode); /* etc.. */ }; --- 552,559 ---- */ struct rig_callbacks { ! int (*freq_event)(RIG *rig, vfo_t vfo, freq_t freq); ! int (*mode_event)(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width); int (*vfo_event)(RIG *rig, vfo_t vfo); ! int (*ptt_event)(RIG *rig, vfo_t vfo, ptt_t mode); /* etc.. */ }; *************** *** 575,623 **** */ ! extern int rig_set_freq(RIG *rig, freq_t freq); /* select freq */ ! extern int rig_get_freq(RIG *rig, freq_t *freq); /* get freq */ ! extern int rig_set_mode(RIG *rig, rmode_t mode, pbwidth_t width); /* select mode */ ! extern int rig_get_mode(RIG *rig, rmode_t *mode, pbwidth_t *width); /* get mode */ extern int rig_set_vfo(RIG *rig, vfo_t vfo); /* select vfo */ extern int rig_get_vfo(RIG *rig, vfo_t *vfo); /* get vfo */ ! extern int rig_set_ptt(RIG *rig, ptt_t ptt); /* ptt on/off */ ! extern int rig_get_ptt(RIG *rig, ptt_t *ptt); /* get ptt status */ ! extern int rig_set_rptr_shift(RIG *rig, rptr_shift_t rptr_shift); /* set repeater shift */ ! extern int rig_get_rptr_shift(RIG *rig, rptr_shift_t *rptr_shift); /* get repeater shift */ ! extern int rig_set_rptr_offs(RIG *rig, unsigned long rptr_offs); /* set repeater offset */ ! extern int rig_get_rptr_offs(RIG *rig, unsigned long *rptr_offs); /* get repeater offset */ ! ! extern int rig_set_ctcss(RIG *rig, unsigned int tone); ! extern int rig_get_ctcss(RIG *rig, unsigned int *tone); ! extern int rig_set_dcs(RIG *rig, unsigned int code); ! extern int rig_get_dcs(RIG *rig, unsigned int *code); ! ! extern int rig_set_ctcss_sql(RIG *rig, unsigned int tone); ! extern int rig_get_ctcss_sql(RIG *rig, unsigned int *tone); ! extern int rig_set_dcs_sql(RIG *rig, unsigned int code); ! extern int rig_get_dcs_sql(RIG *rig, unsigned int *code); ! ! extern int rig_set_split_freq(RIG *rig, freq_t rx_freq, freq_t tx_freq); ! extern int rig_get_split_freq(RIG *rig, freq_t *rx_freq, freq_t *tx_freq); ! extern int rig_set_split(RIG *rig, split_t split); ! extern int rig_get_split(RIG *rig, split_t *split); ! extern int rig_set_rit(RIG *rig, signed long rit); ! extern int rig_get_rit(RIG *rig, signed long *rit); ! extern int rig_set_ts(RIG *rig, unsigned long ts); /* set tuning step */ ! extern int rig_get_ts(RIG *rig, unsigned long *ts); /* get tuning step */ extern int rig_power2mW(RIG *rig, unsigned int *mwpower, float power, freq_t freq, rmode_t mode); extern int rig_mW2power(RIG *rig, float *power, unsigned int mwpower, freq_t freq, rmode_t mode); ! extern int rig_set_level(RIG *rig, setting_t level, value_t val); ! extern int rig_get_level(RIG *rig, setting_t level, value_t *val); ! #define rig_get_strength(r,s) rig_get_level((r), RIG_LEVEL_STRENGTH, (value_t*)(s)) extern int rig_set_poweron(RIG *rig); --- 581,629 ---- */ ! extern int rig_set_freq(RIG *rig, vfo_t vfo, freq_t freq); /* select freq */ ! extern int rig_get_freq(RIG *rig, vfo_t vfo, freq_t *freq); /* get freq */ ! extern int rig_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width); /* select mode */ ! extern int rig_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width); /* get mode */ extern int rig_set_vfo(RIG *rig, vfo_t vfo); /* select vfo */ extern int rig_get_vfo(RIG *rig, vfo_t *vfo); /* get vfo */ ! extern int rig_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt); /* ptt on/off */ ! extern int rig_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt); /* get ptt status */ ! extern int rig_set_rptr_shift(RIG *rig, vfo_t vfo, rptr_shift_t rptr_shift); /* set repeater shift */ ! extern int rig_get_rptr_shift(RIG *rig, vfo_t vfo, rptr_shift_t *rptr_shift); /* get repeater shift */ ! extern int rig_set_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t rptr_offs); /* set repeater offset */ ! extern int rig_get_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t *rptr_offs); /* get repeater offset */ ! ! extern int rig_set_ctcss(RIG *rig, vfo_t vfo, unsigned int tone); ! extern int rig_get_ctcss(RIG *rig, vfo_t vfo, unsigned int *tone); ! extern int rig_set_dcs(RIG *rig, vfo_t vfo, unsigned int code); ! extern int rig_get_dcs(RIG *rig, vfo_t vfo, unsigned int *code); ! ! extern int rig_set_ctcss_sql(RIG *rig, vfo_t vfo, unsigned int tone); ! extern int rig_get_ctcss_sql(RIG *rig, vfo_t vfo, unsigned int *tone); ! extern int rig_set_dcs_sql(RIG *rig, vfo_t vfo, unsigned int code); ! extern int rig_get_dcs_sql(RIG *rig, vfo_t vfo, unsigned int *code); ! ! extern int rig_set_split_freq(RIG *rig, vfo_t vfo, freq_t rx_freq, freq_t tx_freq); ! extern int rig_get_split_freq(RIG *rig, vfo_t vfo, freq_t *rx_freq, freq_t *tx_freq); ! extern int rig_set_split(RIG *rig, vfo_t vfo, split_t split); ! extern int rig_get_split(RIG *rig, vfo_t vfo, split_t *split); ! extern int rig_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit); ! extern int rig_get_rit(RIG *rig, vfo_t vfo, shortfreq_t *rit); ! extern int rig_set_ts(RIG *rig, vfo_t vfo, shortfreq_t ts); /* set tuning step */ ! extern int rig_get_ts(RIG *rig, vfo_t vfo, shortfreq_t *ts); /* get tuning step */ extern int rig_power2mW(RIG *rig, unsigned int *mwpower, float power, freq_t freq, rmode_t mode); extern int rig_mW2power(RIG *rig, float *power, unsigned int mwpower, freq_t freq, rmode_t mode); ! extern int rig_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val); ! extern int rig_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val); ! #define rig_get_strength(r,v,s) rig_get_level((r),(v),RIG_LEVEL_STRENGTH, (value_t*)(s)) extern int rig_set_poweron(RIG *rig); *************** *** 635,651 **** extern setting_t rig_has_func(RIG *rig, setting_t func); /* is part of capabilities? */ ! extern int rig_set_func(RIG *rig, setting_t func, int status); /* activate the function(s) */ ! extern int rig_get_func(RIG *rig, setting_t *func); /* get the setting from rig */ ! extern int rig_set_bank(RIG *rig, int bank); /* set memory bank number */ ! extern int rig_set_mem(RIG *rig, int ch); /* set memory channel number */ ! extern int rig_get_mem(RIG *rig, int *ch); /* get memory channel number */ ! extern int rig_mv_ctl(RIG *rig, mv_op_t op); /* Mem/VFO operation */ extern int rig_set_channel(RIG *rig, const channel_t *chan); extern int rig_get_channel(RIG *rig, channel_t *chan); ! extern int rig_set_trn(RIG *rig, int trn); /* activate the transceive mode */ ! extern int rig_get_trn(RIG *rig, int *trn); --- 641,657 ---- extern setting_t rig_has_func(RIG *rig, setting_t func); /* is part of capabilities? */ ! extern int rig_set_func(RIG *rig, vfo_t vfo, setting_t func, int status); /* activate the function(s) */ ! extern int rig_get_func(RIG *rig, vfo_t vfo, setting_t *func); /* get the setting from rig */ ! extern int rig_set_bank(RIG *rig, vfo_t vfo, int bank); /* set memory bank number */ ! extern int rig_set_mem(RIG *rig, vfo_t vfo, int ch); /* set memory channel number */ ! extern int rig_get_mem(RIG *rig, vfo_t vfo, int *ch); /* get memory channel number */ ! extern int rig_mv_ctl(RIG *rig, vfo_t vfo, mv_op_t op); /* Mem/VFO operation */ extern int rig_set_channel(RIG *rig, const channel_t *chan); extern int rig_get_channel(RIG *rig, channel_t *chan); ! extern int rig_set_trn(RIG *rig, vfo_t vfo, int trn); /* activate the transceive mode */ ! extern int rig_get_trn(RIG *rig, vfo_t vfo, int *trn); *************** *** 671,674 **** #endif /* _RIG_H */ - --- 677,679 ---- |
From: Stephane F. <f4...@us...> - 2000-12-05 21:52:47
|
Update of /cvsroot/hamlib/hamlib In directory slayer.i.sourceforge.net:/tmp/cvs-serv3454 Modified Files: TODO Log Message: * more stuff to do Index: TODO =================================================================== RCS file: /cvsroot/hamlib/hamlib/TODO,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** TODO 2000/11/01 23:19:03 1.11 --- TODO 2000/12/05 21:52:44 1.12 *************** *** 23,27 **** 16. Write .spec (rpm) and .deb (debian) package files 18. rewrite the post_write_delay. Active delay is a waste of cycles! ! DONE --- 23,33 ---- 16. Write .spec (rpm) and .deb (debian) package files 18. rewrite the post_write_delay. Active delay is a waste of cycles! ! 19. specify how to access Reverse modes (CWR, RTTYW). through set_mode? ! 20. rework API include files to support C++ (__BEGIN_DECLS/__END_DECLS, etc.) ! 21. grab cygwin and test portability under Win32 (what about MacOS?) ! 22. handle nicely different versions of same rig coming for ! ITU region1/region2 ham band (-> freq ranges in capabilities) ! 23. add support in the API for additional filters, DSP bandpass control ! 24. Should Hamlib (the library itself) be LGPL'ed ? DONE |
From: Stephane F. <f4...@us...> - 2000-12-05 21:51:42
|
Update of /cvsroot/hamlib/hamlib/doc In directory slayer.i.sourceforge.net:/tmp/cvs-serv3251 Modified Files: Makefile.am Log Message: * added NOTES in the distribution Index: Makefile.am =================================================================== RCS file: /cvsroot/hamlib/hamlib/doc/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** Makefile.am 2000/10/29 10:17:08 1.2 --- Makefile.am 2000/12/05 21:51:36 1.3 *************** *** 1,2 **** noinst_SCRIPTS = hamlib-doc split-man.pl ! EXTRA_DIST = hamlib-doc split-man.pl --- 1,2 ---- noinst_SCRIPTS = hamlib-doc split-man.pl ! EXTRA_DIST = hamlib-doc split-man.pl NOTES |
From: Stephane F. <f4...@us...> - 2000-12-05 19:32:57
|
Update of /cvsroot/hamlib/hamlib/tests In directory slayer.i.sourceforge.net:/tmp/cvs-serv16930 Modified Files: testrig.c Log Message: * [sg]et_mode is now responsible for setting/getting the passband Index: testrig.c =================================================================== RCS file: /cvsroot/hamlib/hamlib/tests/testrig.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** testrig.c 2000/11/25 21:52:41 1.4 --- testrig.c 2000/12/05 19:32:48 1.5 *************** *** 14,17 **** --- 14,18 ---- freq_t freq; /* frequency */ rmode_t rmode; /* radio mode of operation */ + pbwidth_t width; vfo_t vfo; /* vfo selection */ int strength; /* S-Meter level */ *************** *** 96,100 **** } ! retcode = rig_set_mode(my_rig, RIG_MODE_LSB); if (retcode != RIG_OK ) { --- 97,101 ---- } ! retcode = rig_set_mode(my_rig, RIG_MODE_LSB, RIG_PASSBAND_NORMAL); if (retcode != RIG_OK ) { *************** *** 123,127 **** } ! retcode = rig_get_mode(my_rig, &rmode); if (retcode == RIG_OK ) { --- 124,128 ---- } ! retcode = rig_get_mode(my_rig, &rmode, &width); if (retcode == RIG_OK ) { |
From: Stephane F. <f4...@us...> - 2000-12-04 23:45:33
|
Update of /cvsroot/hamlib/hamlib/include In directory slayer.i.sourceforge.net:/tmp/cvs-serv7398 Modified Files: config.h.in Log Message: * regenerated due to added libgd option Index: config.h.in =================================================================== RCS file: /cvsroot/hamlib/hamlib/include/config.h.in,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** config.h.in 2000/10/01 12:44:00 1.1 --- config.h.in 2000/12/04 23:45:28 1.2 *************** *** 39,42 **** --- 39,45 ---- #undef HAVE_DLOPEN + /* Define if you have the gdImageCreate function. */ + #undef HAVE_GDIMAGECREATE + /* Define if you have the select function. */ #undef HAVE_SELECT *************** *** 57,60 **** --- 60,66 ---- #undef HAVE_FCNTL_H + /* Define if you have the <gd.h> header file. */ + #undef HAVE_GD_H + /* Define if you have the <sys/ioctl.h> header file. */ #undef HAVE_SYS_IOCTL_H *************** *** 71,74 **** --- 77,83 ---- /* Define if you have the dl library (-ldl). */ #undef HAVE_LIBDL + + /* Define if you have the gd library (-lgd). */ + #undef HAVE_LIBGD /* Define if you have the intl library (-lintl). */ |
From: Stephane F. <f4...@us...> - 2000-12-04 23:39:21
|
Update of /cvsroot/hamlib/hamlib/icom In directory slayer.i.sourceforge.net:/tmp/cvs-serv6495/icom Modified Files: frame.c frame.h icom.c icom.h Log Message: * removed [sg]et_passband in favor of an enhanced [sg]et_mode which includes the passband, since most rigs tie these parameters together quite often. For exemple, WFM is (RIG_MODE_FM,RIG_PASSBAND_WIDE) in Hamlib. Another set of functions will be needed to fine tune aditional frequency response/filters. Index: frame.c =================================================================== RCS file: /cvsroot/hamlib/hamlib/icom/frame.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** frame.c 2000/11/01 23:21:47 1.5 --- frame.c 2000/12/04 23:39:17 1.6 *************** *** 195,199 **** ! unsigned short hamlib2icom_mode(rmode_t mode) { int icmode, icmode_ext; --- 195,202 ---- ! /* ! * TODO: be more exhaustive ! */ ! unsigned short hamlib2icom_mode(rmode_t mode, pbwidth_t width) { int icmode, icmode_ext; *************** *** 207,228 **** case RIG_MODE_LSB: icmode = S_LSB; break; case RIG_MODE_RTTY: icmode = S_RTTY; break; ! case RIG_MODE_FM: icmode = S_FM; break; ! #if 0 ! case RIG_MODE_WFM: icmode = S_WFM; break; ! ! case RIG_MODE_NFM: icmode = S_FM; icmode_ext = 0x01; break; ! case RIG_MODE_NAM: icmode = S_AM; break; ! case RIG_MODE_WAM: icmode = S_AM; break; ! case RIG_MODE_NCW: icmode = S_CW; break; ! case RIG_MODE_WCW: icmode = S_CW; break; ! case RIG_MODE_CWR: icmode = S_CW; break; ! case RIG_MODE_NUSB: icmode = S_USB; break; ! case RIG_MODE_WUSB: icmode = S_USB; break; ! case RIG_MODE_NLSB: icmode = S_LSB; break; ! case RIG_MODE_WLSB: icmode = S_LSB; break; ! case RIG_MODE_NRTTY: icmode = S_RTTY; break; ! case RIG_MODE_WRTTY: icmode = S_RTTY; break; ! #endif ! default: rig_debug(RIG_DEBUG_ERR,"icom: Unsupported Hamlib mode %d\n",mode); --- 210,217 ---- case RIG_MODE_LSB: icmode = S_LSB; break; case RIG_MODE_RTTY: icmode = S_RTTY; break; ! case RIG_MODE_FM: ! icmode = width==RIG_PASSBAND_WIDE?S_WFM:S_FM; ! icmode_ext = width==RIG_PASSBAND_NARROW?0x01:0x00; ! break; default: rig_debug(RIG_DEBUG_ERR,"icom: Unsupported Hamlib mode %d\n",mode); *************** *** 232,247 **** } ! rmode_t icom2hamlib_mode(unsigned short icmode) { ! rmode_t mode; switch (icmode & 0xff) { ! case S_AM: mode = RIG_MODE_AM; break; ! case S_CW: mode = RIG_MODE_CW; break; ! case S_FM: mode = RIG_MODE_FM; break; ! case S_WFM: mode = RIG_MODE_FM; break; /* and set width to wide.. */ ! case S_USB: mode = RIG_MODE_USB; break; ! case S_LSB: mode = RIG_MODE_LSB; break; ! case S_RTTY: mode = RIG_MODE_RTTY; break; case 0xff: mode = 0; break; /* blank mem channel */ --- 221,239 ---- } ! void icom2hamlib_mode(unsigned short icmode, rmode_t *mode, pbwidth_t *width) { ! *width = RIG_PASSBAND_NORMAL; switch (icmode & 0xff) { ! case S_AM: *mode = RIG_MODE_AM; break; ! case S_CW: *mode = RIG_MODE_CW; break; ! case S_FM: *mode = RIG_MODE_FM; break; ! case S_WFM: ! *mode = RIG_MODE_FM; ! *width = RIG_PASSBAND_WIDE; ! break; ! case S_USB: *mode = RIG_MODE_USB; break; ! case S_LSB: *mode = RIG_MODE_LSB; break; ! case S_RTTY: *mode = RIG_MODE_RTTY; break; case 0xff: mode = 0; break; /* blank mem channel */ *************** *** 249,255 **** rig_debug(RIG_DEBUG_ERR,"icom: Unsupported Icom mode %#.2x\n", icmode); ! mode = 0; } - return mode; } --- 241,246 ---- rig_debug(RIG_DEBUG_ERR,"icom: Unsupported Icom mode %#.2x\n", icmode); ! *mode = 0; } } Index: frame.h =================================================================== RCS file: /cvsroot/hamlib/hamlib/icom/frame.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** frame.h 2000/11/01 23:21:47 1.3 --- frame.h 2000/12/04 23:39:17 1.4 *************** *** 39,44 **** int read_icom_frame(FILE *stream, unsigned char rxbuffer[], int timeout); ! unsigned short hamlib2icom_mode(rmode_t mode); ! rmode_t icom2hamlib_mode(unsigned short icmode); #endif /* _FRAME_H */ --- 39,44 ---- int read_icom_frame(FILE *stream, unsigned char rxbuffer[], int timeout); ! unsigned short hamlib2icom_mode(rmode_t mode, pbwidth_t width); ! void icom2hamlib_mode(unsigned short icmode, rmode_t *mode, pbwidth_t *width); #endif /* _FRAME_H */ Index: icom.c =================================================================== RCS file: /cvsroot/hamlib/hamlib/icom/icom.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** icom.c 2000/10/29 16:25:56 1.9 --- icom.c 2000/12/04 23:39:17 1.10 *************** *** 355,359 **** * Assumes rig!=NULL, rig->state.priv!=NULL */ ! int icom_set_mode(RIG *rig, rmode_t mode) { struct icom_priv_data *priv; --- 355,359 ---- * Assumes rig!=NULL, rig->state.priv!=NULL */ ! int icom_set_mode(RIG *rig, rmode_t mode, pbwidth_t width) { struct icom_priv_data *priv; *************** *** 365,369 **** priv = (struct icom_priv_data*)rig_s->priv; ! icmode = hamlib2icom_mode(mode); icom_transaction (rig, C_SET_MODE, icmode, NULL, 0, ackbuf, &ack_len); --- 365,369 ---- priv = (struct icom_priv_data*)rig_s->priv; ! icmode = hamlib2icom_mode(mode,width); icom_transaction (rig, C_SET_MODE, icmode, NULL, 0, ackbuf, &ack_len); *************** *** 380,386 **** /* * icom_get_mode ! * Assumes rig!=NULL, rig->state.priv!=NULL, mode!=NULL */ ! int icom_get_mode(RIG *rig, rmode_t *mode) { struct icom_priv_data *priv; --- 380,386 ---- /* * icom_get_mode ! * Assumes rig!=NULL, rig->state.priv!=NULL, mode!=NULL, width!=NULL */ ! int icom_get_mode(RIG *rig, rmode_t *mode, pbwidth_t *width) { struct icom_priv_data *priv; *************** *** 404,408 **** } ! *mode = icom2hamlib_mode(modebuf[1]| modebuf[2]<<8); return RIG_OK; --- 404,408 ---- } ! icom2hamlib_mode(modebuf[1]| modebuf[2]<<8, mode, width); return RIG_OK; *************** *** 1031,1035 **** chan_len = 3+freq_len+1; ! icmode = hamlib2icom_mode(chan->mode); chanbuf[chan_len++] = icmode&0xff; chanbuf[chan_len++] = icmode>>8; --- 1031,1035 ---- chan_len = 3+freq_len+1; ! icmode = hamlib2icom_mode(chan->mode, RIG_PASSBAND_NORMAL); /* FIXME */ chanbuf[chan_len++] = icmode&0xff; chanbuf[chan_len++] = icmode>>8; *************** *** 1062,1065 **** --- 1062,1066 ---- unsigned char chanbuf[24]; int chan_len,freq_len; + pbwidth_t width; /* FIXME */ rig_s = &rig->state; *************** *** 1090,1094 **** chan_len = 4+freq_len+1; ! chan->mode = icom2hamlib_mode(chanbuf[chan_len] | chanbuf[chan_len+1]); chan_len += 2; chan->att = from_bcd_be(chanbuf+chan_len++,2); --- 1091,1096 ---- chan_len = 4+freq_len+1; ! icom2hamlib_mode(chanbuf[chan_len] | chanbuf[chan_len+1], ! &chan->mode, &width); chan_len += 2; chan->att = from_bcd_be(chanbuf+chan_len++,2); *************** *** 1280,1283 **** --- 1282,1286 ---- freq_t freq; rmode_t mode; + pbwidth_t width; rig_debug(RIG_DEBUG_VERBOSE, "icom: icom_decode called\n"); *************** *** 1306,1311 **** case C_SND_MODE: if (rig->callbacks.mode_event) { ! mode = icom2hamlib_mode(buf[5]| buf[6]<<8); ! return rig->callbacks.mode_event(rig,mode); } else return -RIG_ENAVAIL; --- 1309,1314 ---- case C_SND_MODE: if (rig->callbacks.mode_event) { ! icom2hamlib_mode(buf[5]| buf[6]<<8, &mode, &width); ! return rig->callbacks.mode_event(rig,mode,width); } else return -RIG_ENAVAIL; Index: icom.h =================================================================== RCS file: /cvsroot/hamlib/hamlib/icom/icom.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** icom.h 2000/10/29 16:26:23 1.8 --- icom.h 2000/12/04 23:39:17 1.9 *************** *** 45,50 **** int icom_set_freq(RIG *rig, freq_t freq); int icom_get_freq(RIG *rig, freq_t *freq); ! int icom_set_mode(RIG *rig, rmode_t mode); ! int icom_get_mode(RIG *rig, rmode_t *mode); int icom_set_vfo(RIG *rig, vfo_t vfo); int icom_set_rptr_shift(RIG *rig, rptr_shift_t rptr_shift); --- 45,50 ---- int icom_set_freq(RIG *rig, freq_t freq); int icom_get_freq(RIG *rig, freq_t *freq); ! int icom_set_mode(RIG *rig, rmode_t mode, pbwidth_t width); ! int icom_get_mode(RIG *rig, rmode_t *mode, pbwidth_t *width); int icom_set_vfo(RIG *rig, vfo_t vfo); int icom_set_rptr_shift(RIG *rig, rptr_shift_t rptr_shift); |
From: Stephane F. <f4...@us...> - 2000-12-04 23:39:21
|
Update of /cvsroot/hamlib/hamlib/include/hamlib In directory slayer.i.sourceforge.net:/tmp/cvs-serv6495/include/hamlib Modified Files: rig.h Log Message: * removed [sg]et_passband in favor of an enhanced [sg]et_mode which includes the passband, since most rigs tie these parameters together quite often. For exemple, WFM is (RIG_MODE_FM,RIG_PASSBAND_WIDE) in Hamlib. Another set of functions will be needed to fine tune aditional frequency response/filters. Index: rig.h =================================================================== RCS file: /cvsroot/hamlib/hamlib/include/hamlib/rig.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** rig.h 2000/11/28 22:31:40 1.9 --- rig.h 2000/12/04 23:39:17 1.10 *************** *** 239,243 **** #define RIG_LEVEL_STRENGTH (1<<31) /* Signal strength, arg int (db) */ ! typedef unsigned long setting_t; /* at least 32 bits */ /* --- 239,243 ---- #define RIG_LEVEL_STRENGTH (1<<31) /* Signal strength, arg int (db) */ ! typedef unsigned long setting_t; /* 32 bits might not be enough.. */ /* *************** *** 285,289 **** typedef unsigned int rmode_t; /* radio mode */ ! /* Do not use an enum since this will be used w/ rig_mode_t bit fields */ #define RIG_MODE_NONE 0 #define RIG_MODE_AM (1<<0) --- 285,293 ---- typedef unsigned int rmode_t; /* radio mode */ ! /* ! * Do not use an enum since this will be used w/ rig_mode_t bit fields. ! * Also, how should CW reverse sideband and RTTY reverse ! * sideband be handled? ! * */ #define RIG_MODE_NONE 0 #define RIG_MODE_AM (1<<0) *************** *** 294,316 **** #define RIG_MODE_FM (1<<5) - /* The following are deprecated */ - /* use the get/set_filter to manipulate these bits */ - #if 0 - #define RIG_MODE_WFM (1<<6) - #define RIG_MODE_CWR (1<<7) /* CW reverse sideband*/ - #define RIG_MODE_RTTYR (1<<8) /* RTTY reverse sideband */ - - #define RIG_MODE_NFM (1<<19) /* should we distinguish modes w/ filers? */ - #define RIG_MODE_NAM (1<<20) /* Narrow AM */ - #define RIG_MODE_WAM (1<<9) /* Wide AM */ - #define RIG_MODE_NCW (1<<10) - #define RIG_MODE_WCW (1<<11) - #define RIG_MODE_NUSB (1<<13) - #define RIG_MODE_WUSB (1<<14) - #define RIG_MODE_NLSB (1<<15) - #define RIG_MODE_WLSB (1<<16) - #define RIG_MODE_NRTTY (1<<17) - #define RIG_MODE_WRTTY (1<<18) - #endif --- 298,301 ---- *************** *** 432,437 **** int (*get_freq)(RIG *rig, freq_t *freq); /* get freq */ ! int (*set_mode)(RIG *rig, rmode_t mode); /* select mode */ ! int (*get_mode)(RIG *rig, rmode_t *mode); /* get mode */ int (*set_vfo)(RIG *rig, vfo_t vfo); /* select vfo (A,B, etc.) */ --- 417,422 ---- int (*get_freq)(RIG *rig, freq_t *freq); /* get freq */ ! int (*set_mode)(RIG *rig, rmode_t mode, pbwidth_t width); /* select mode */ ! int (*get_mode)(RIG *rig, rmode_t *mode, pbwidth_t *width); /* get mode */ int (*set_vfo)(RIG *rig, vfo_t vfo); /* select vfo (A,B, etc.) */ *************** *** 441,447 **** int (*get_ptt)(RIG *rig, ptt_t *ptt); /* get ptt status */ - int (*set_passband)(RIG *rig, pbwidth_t width); /* select width */ - int (*get_passband)(RIG *rig, pbwidth_t *width); /* get width */ - int (*set_rptr_shift)(RIG *rig, rptr_shift_t rptr_shift); /* set repeater shift */ int (*get_rptr_shift)(RIG *rig, rptr_shift_t *rptr_shift); /* get repeater shift */ --- 426,429 ---- *************** *** 565,569 **** struct rig_callbacks { int (*freq_event)(RIG *rig, freq_t freq); ! int (*mode_event)(RIG *rig, rmode_t mode); int (*vfo_event)(RIG *rig, vfo_t vfo); int (*ptt_event)(RIG *rig, ptt_t mode); --- 547,551 ---- struct rig_callbacks { int (*freq_event)(RIG *rig, freq_t freq); ! int (*mode_event)(RIG *rig, rmode_t mode, pbwidth_t width); int (*vfo_event)(RIG *rig, vfo_t vfo); int (*ptt_event)(RIG *rig, ptt_t mode); *************** *** 595,604 **** extern int rig_set_freq(RIG *rig, freq_t freq); /* select freq */ extern int rig_get_freq(RIG *rig, freq_t *freq); /* get freq */ - - extern int rig_set_mode(RIG *rig, rmode_t mode); /* select mode */ - extern int rig_get_mode(RIG *rig, rmode_t *mode); /* get mode */ ! extern int rig_set_passband(RIG *rig, pbwidth_t width); /* select width */ ! extern int rig_get_passband(RIG *rig, pbwidth_t *width); /* get width */ extern int rig_set_vfo(RIG *rig, vfo_t vfo); /* select vfo */ --- 577,583 ---- extern int rig_set_freq(RIG *rig, freq_t freq); /* select freq */ extern int rig_get_freq(RIG *rig, freq_t *freq); /* get freq */ ! extern int rig_set_mode(RIG *rig, rmode_t mode, pbwidth_t width); /* select mode */ ! extern int rig_get_mode(RIG *rig, rmode_t *mode, pbwidth_t *width); /* get mode */ extern int rig_set_vfo(RIG *rig, vfo_t vfo); /* select vfo */ |
From: Stephane F. <f4...@us...> - 2000-12-04 23:39:21
|
Update of /cvsroot/hamlib/hamlib/tests In directory slayer.i.sourceforge.net:/tmp/cvs-serv6495/tests Modified Files: rigctl.c Log Message: * removed [sg]et_passband in favor of an enhanced [sg]et_mode which includes the passband, since most rigs tie these parameters together quite often. For exemple, WFM is (RIG_MODE_FM,RIG_PASSBAND_WIDE) in Hamlib. Another set of functions will be needed to fine tune aditional frequency response/filters. Index: rigctl.c =================================================================== RCS file: /cvsroot/hamlib/hamlib/tests/rigctl.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** rigctl.c 2000/11/28 22:34:37 1.2 --- rigctl.c 2000/12/04 23:39:18 1.3 *************** *** 47,52 **** static int set_mode(RIG *rig); static int get_mode(RIG *rig); - static int set_passband(RIG *rig); - static int get_passband(RIG *rig); static int set_vfo(RIG *rig); static int get_vfo(RIG *rig); --- 47,50 ---- *************** *** 86,91 **** { 'M', "rig_set_mode", set_mode }, { 'm', "rig_get_mode", get_mode }, - { 'P', "rig_set_passband", set_passband }, - { 'p', "rig_get_passband", get_passband }, { 'V', "rig_set_vfo", set_vfo }, { 'v', "rig_get_vfo", get_vfo }, --- 84,87 ---- *************** *** 226,264 **** { rmode_t mode; printf("Mode: "); scanf("%d", &mode); - return rig_set_mode(rig, mode); - } - - - static int get_mode(RIG *rig) - { - int status; - rmode_t mode; - - status = rig_get_mode(rig, &mode); - printf("Mode: %d\n", mode); - return status; - } - - - static int set_passband(RIG *rig) - { - pbwidth_t width; - printf("Passband: "); scanf("%d", (int*)&width); ! return rig_set_passband(rig, width); } ! static int get_passband(RIG *rig) { int status; pbwidth_t width; ! status = rig_get_passband(rig, &width); ! printf("Passband: %d\n", width); return status; } --- 222,243 ---- { rmode_t mode; + pbwidth_t width; printf("Mode: "); scanf("%d", &mode); printf("Passband: "); scanf("%d", (int*)&width); ! return rig_set_mode(rig, mode, width); } ! static int get_mode(RIG *rig) { int status; + rmode_t mode; pbwidth_t width; ! status = rig_get_mode(rig, &mode, &width); ! printf("Mode: %d\nPassband: %d\n", mode, width); return status; } |
From: Stephane F. <f4...@us...> - 2000-12-04 23:39:21
|
Update of /cvsroot/hamlib/hamlib/aor In directory slayer.i.sourceforge.net:/tmp/cvs-serv6495/aor Modified Files: aor.c aor.h Log Message: * removed [sg]et_passband in favor of an enhanced [sg]et_mode which includes the passband, since most rigs tie these parameters together quite often. For exemple, WFM is (RIG_MODE_FM,RIG_PASSBAND_WIDE) in Hamlib. Another set of functions will be needed to fine tune aditional frequency response/filters. Index: aor.c =================================================================== RCS file: /cvsroot/hamlib/hamlib/aor/aor.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** aor.c 2000/11/01 23:23:56 1.1 --- aor.c 2000/12/04 23:39:17 1.2 *************** *** 160,164 **** * Assumes rig!=NULL */ ! int aor_set_mode(RIG *rig, rmode_t mode) { unsigned char mdbuf[16],ackbuf[16]; --- 160,164 ---- * Assumes rig!=NULL */ ! int aor_set_mode(RIG *rig, rmode_t mode, pbwidth_t width) { unsigned char mdbuf[16],ackbuf[16]; *************** *** 166,174 **** switch (mode) { ! case RIG_MODE_AM: aormode = MD_AM; break; case RIG_MODE_CW: aormode = MD_CW; break; case RIG_MODE_USB: aormode = MD_USB; break; case RIG_MODE_LSB: aormode = MD_LSB; break; ! case RIG_MODE_FM: aormode = MD_NFM; break; case RIG_MODE_RTTY: default: --- 166,196 ---- switch (mode) { ! case RIG_MODE_AM: ! switch(width) { ! case RIG_PASSBAND_NORMAL: aormode = MD_AM; break; ! case RIG_PASSBAND_WIDE: aormode = MD_WAM; break; ! case RIG_PASSBAND_NARROW: aormode = MD_NAM; break; ! default: ! rig_debug(RIG_DEBUG_ERR, ! "aor_set_mode: unsupported passband %d %d\n", ! mode, width); ! return -RIG_EINVAL; ! } ! break; case RIG_MODE_CW: aormode = MD_CW; break; case RIG_MODE_USB: aormode = MD_USB; break; case RIG_MODE_LSB: aormode = MD_LSB; break; ! case RIG_MODE_FM: ! switch(width) { ! case RIG_PASSBAND_NORMAL: aormode = MD_NFM; break; ! case RIG_PASSBAND_WIDE: aormode = MD_WFM; break; ! case RIG_PASSBAND_NARROW: aormode = MD_SFM; break; ! default: ! rig_debug(RIG_DEBUG_ERR, ! "aor_set_mode: unsupported passband %d %d\n", ! mode, width); ! return -RIG_EINVAL; ! } ! break; case RIG_MODE_RTTY: default: *************** *** 194,198 **** * Assumes rig!=NULL, mode!=NULL */ ! int aor_get_mode(RIG *rig, rmode_t *mode) { unsigned char ackbuf[16]; --- 216,220 ---- * Assumes rig!=NULL, mode!=NULL */ ! int aor_get_mode(RIG *rig, rmode_t *mode, pbwidth_t *width) { unsigned char ackbuf[16]; *************** *** 208,217 **** --- 230,255 ---- } + *width = RIG_PASSBAND_NORMAL; switch (ackbuf[0]) { case MD_AM: *mode = RIG_MODE_AM; break; + case MD_NAM: + *mode = RIG_MODE_AM; + *width = RIG_PASSBAND_NARROW; + break; + case MD_WAM: + *mode = RIG_MODE_AM; + *width = RIG_PASSBAND_WIDE; + break; case MD_CW: *mode = RIG_MODE_CW; break; case MD_USB: *mode = RIG_MODE_USB; break; case MD_LSB: *mode = RIG_MODE_LSB; break; case MD_NFM: *mode = RIG_MODE_FM; break; + case MD_SFM: + *mode = RIG_MODE_FM; + *width = RIG_PASSBAND_NARROW; + break; + case MD_WFM: *mode = RIG_MODE_FM; + *width = RIG_PASSBAND_WIDE; + break; default: rig_debug(RIG_DEBUG_ERR,"aor_get_mode: unsupported mode %d\n", Index: aor.h =================================================================== RCS file: /cvsroot/hamlib/hamlib/aor/aor.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** aor.h 2000/11/01 23:23:56 1.1 --- aor.h 2000/12/04 23:39:17 1.2 *************** *** 34,39 **** int aor_set_freq(RIG *rig, freq_t freq); int aor_get_freq(RIG *rig, freq_t *freq); ! int aor_set_mode(RIG *rig, rmode_t mode); ! int aor_get_mode(RIG *rig, rmode_t *mode); int aor_set_ts(RIG *rig, unsigned long ts); --- 34,39 ---- int aor_set_freq(RIG *rig, freq_t freq); int aor_get_freq(RIG *rig, freq_t *freq); ! int aor_set_mode(RIG *rig, rmode_t mode, pbwidth_t width); ! int aor_get_mode(RIG *rig, rmode_t *mode, pbwidth_t *width); int aor_set_ts(RIG *rig, unsigned long ts); |
From: Stephane F. <f4...@us...> - 2000-12-04 23:39:20
|
Update of /cvsroot/hamlib/hamlib/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv6495/src Modified Files: rig.c Log Message: * removed [sg]et_passband in favor of an enhanced [sg]et_mode which includes the passband, since most rigs tie these parameters together quite often. For exemple, WFM is (RIG_MODE_FM,RIG_PASSBAND_WIDE) in Hamlib. Another set of functions will be needed to fine tune aditional frequency response/filters. Index: rig.c =================================================================== RCS file: /cvsroot/hamlib/hamlib/src/rig.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** rig.c 2000/11/28 22:33:37 1.9 --- rig.c 2000/12/04 23:39:18 1.10 *************** *** 399,404 **** --- 399,407 ---- * @rig: The rig handle * @mode: The mode to set to + * @width: The passband width to set to * * The rig_set_mode() function sets the mode of the current VFO. + * As a begining, the backend is free to ignore the @width argument, + * however, it would be nice to at least honor the WFM case. * * RETURN VALUE: The rig_set_mode() function returns %RIG_OK *************** *** 409,413 **** */ ! int rig_set_mode(RIG *rig, rmode_t mode) { if (!rig || !rig->caps) --- 412,416 ---- */ ! int rig_set_mode(RIG *rig, rmode_t mode, pbwidth_t width) { if (!rig || !rig->caps) *************** *** 417,421 **** return -RIG_ENAVAIL; else ! return rig->caps->set_mode(rig, mode); } --- 420,424 ---- return -RIG_ENAVAIL; else ! return rig->caps->set_mode(rig, mode, width); } *************** *** 424,429 **** --- 427,435 ---- * @rig: The rig handle * @mode: The location where to store the current mode + * @width: The location where to store the current passband width * * The rig_set_mode() function retrieves the mode of the current VFO. + * If the backend is unable to determine the width, it must + * return %RIG_PASSBAND_NORMAL as a default. * * RETURN VALUE: The rig_get_mode() function returns %RIG_OK *************** *** 434,440 **** */ ! int rig_get_mode(RIG *rig, rmode_t *mode) { ! if (!rig || !rig->caps || !mode) return -RIG_EINVAL; --- 440,446 ---- */ ! int rig_get_mode(RIG *rig, rmode_t *mode, pbwidth_t *width) { ! if (!rig || !rig->caps || !mode || !width) return -RIG_EINVAL; *************** *** 442,478 **** return -RIG_ENAVAIL; else ! return rig->caps->get_mode(rig, mode); ! } ! ! /* ! * rig_set_passband ! * ! */ ! ! int rig_set_passband(RIG *rig, pbwidth_t width) ! { ! if (!rig || !rig->caps) ! return -RIG_EINVAL; ! ! if (rig->caps->set_passband == NULL) ! return -RIG_ENAVAIL; ! else ! return rig->caps->set_passband(rig, width); ! } ! ! /* ! * rig_get_passband ! * ! */ ! ! int rig_get_passband(RIG *rig, pbwidth_t *width) ! { ! if (!rig || !rig->caps || !width) ! return -RIG_EINVAL; ! ! if (rig->caps->get_passband == NULL) ! return -RIG_ENAVAIL; ! else ! return rig->caps->get_passband(rig, width); } --- 448,452 ---- return -RIG_ENAVAIL; else ! return rig->caps->get_mode(rig, mode, width); } |