hamlib-cvs-digest Mailing List for Ham Radio Control Libraries (Page 226)
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
(47) |
Sep
(38) |
Oct
(4) |
Nov
|
Dec
|
From: Frank S. <jav...@us...> - 2000-11-25 21:49:40
|
Update of /cvsroot/hamlib/hamlib/ft747 In directory slayer.i.sourceforge.net:/tmp/cvs-serv17770 Modified Files: ft747.c ft747.h Log Message: added set/get freq to use generic bcd etc Index: ft747.c =================================================================== RCS file: /cvsroot/hamlib/hamlib/ft747/ft747.c,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -r1.20 -r1.21 *** ft747.c 2000/11/25 08:20:06 1.20 --- ft747.c 2000/11/25 21:49:34 1.21 *************** *** 32,41 **** * TODO - FS * ! * 1. Rentrant code * 2. rationalise code, more helper functions. * * - * - * */ --- 32,41 ---- * TODO - FS * ! * 1. Rentrant code, handle static stuff * 2. rationalise code, more helper functions. + * 3. Allow cached reads + * 4. Fix crappy 25Hz resolution handling * * */ *************** *** 53,61 **** #include "serial.h" #include "ft747.h" /* prototypes */ - int ft747_set_freq_main_vfo_hz(RIG *rig, freq_t freq, rmode_t mode); static int ft747_get_update_data(RIG *rig); --- 53,61 ---- #include "serial.h" #include "ft747.h" + #include "misc.h" /* prototypes */ static int ft747_get_update_data(RIG *rig); *************** *** 64,78 **** * Receiver caps */ - #if 0 - #define FT747_ALL_RX_MODES (RIG_MODE_AM| RIG_MODE_CW| RIG_MODE_USB| RIG_MODE_LSB| RIG_MODE_NAM| RIG_MODE_NCW) - #define FT747_SSB_CW_RX_MODES (RIG_MODE_CW| RIG_MODE_USB| RIG_MODE_LSB| RIG_MODE_NCW) - #define FT747_AM_RX_MODES (RIG_MODE_AM| RIG_MODE_NAM) - #else #define FT747_ALL_RX_MODES (RIG_MODE_AM|RIG_MODE_CW|RIG_MODE_USB|RIG_MODE_LSB) #define FT747_SSB_CW_RX_MODES (RIG_MODE_CW|RIG_MODE_USB|RIG_MODE_LSB) #define FT747_AM_RX_MODES (RIG_MODE_AM) - #endif - #define FT747_FM_RX_MODES (RIG_MODE_FM) --- 64,72 ---- * Receiver caps */ + #define FT747_ALL_RX_MODES (RIG_MODE_AM|RIG_MODE_CW|RIG_MODE_USB|RIG_MODE_LSB) #define FT747_SSB_CW_RX_MODES (RIG_MODE_CW|RIG_MODE_USB|RIG_MODE_LSB) #define FT747_AM_RX_MODES (RIG_MODE_AM) #define FT747_FM_RX_MODES (RIG_MODE_FM) *************** *** 158,168 **** }; - /* - * Init some private data - */ - - static const struct ft747_priv_data ft747_priv = { 0 }; /* dummy atm */ - /* * Function definitions below --- 152,156 ---- *************** *** 190,194 **** } ! printf("ft747:ft747_init called \n"); /* init the priv_data from static struct --- 178,182 ---- } ! rig_debug(RIG_DEBUG_VERBOSE,"ft747:ft747_init called \n"); /* init the priv_data from static struct *************** *** 274,282 **** int ft747_set_freq(RIG *rig, freq_t freq) { return -RIG_ENIMPL; } int ft747_get_freq(RIG *rig, freq_t *freq) { ! return -RIG_ENIMPL; } --- 262,317 ---- int ft747_set_freq(RIG *rig, freq_t freq) { + 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; + + rig_debug(RIG_DEBUG_VERBOSE,"ft747: requested freq = %Li Hz \n", freq); + + 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_ENIMPL; } int ft747_get_freq(RIG *rig, freq_t *freq) { ! struct ft747_priv_data *p; ! freq_t f; ! ! if (!rig) ! return -RIG_EINVAL; ! ! p = (struct ft747_priv_data*)rig->state.priv; ! ! 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 */ ! ! return RIG_OK; } *************** *** 338,342 **** int ft747_get_mode(RIG *rig, rmode_t *mode) { - struct rig_state *rig_s; struct ft747_priv_data *p; unsigned char mymode; /* ft747 mode */ --- 373,376 ---- *************** *** 346,350 **** p = (struct ft747_priv_data*)rig->state.priv; - rig_s = &rig->state; ft747_get_update_data(rig); /* get whole shebang from rig */ --- 380,383 ---- *************** *** 427,431 **** int ft747_get_vfo(RIG *rig, vfo_t *vfo) { - struct rig_state *rig_s; struct ft747_priv_data *p; unsigned char status; /* ft747 status flag */ --- 460,463 ---- *************** *** 435,439 **** p = (struct ft747_priv_data*)rig->state.priv; - rig_s = &rig->state; ft747_get_update_data(rig); /* get whole shebang from rig */ --- 467,470 ---- *************** *** 487,491 **** int ft747_get_ptt(RIG *rig, ptt_t *ptt) { - struct rig_state *rig_s; struct ft747_priv_data *p; unsigned char status; /* ft747 mode */ --- 518,521 ---- *************** *** 495,499 **** p = (struct ft747_priv_data*)rig->state.priv; - rig_s = &rig->state; ft747_get_update_data(rig); /* get whole shebang from rig */ --- 525,528 ---- Index: ft747.h =================================================================== RCS file: /cvsroot/hamlib/hamlib/ft747/ft747.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** ft747.h 2000/11/25 08:19:21 1.14 --- ft747.h 2000/11/25 21:49:34 1.15 *************** *** 39,43 **** ! /* Sequential fast writes confuse FT747 without this delay */ #define FT747_POST_WRITE_DELAY 5 --- 39,43 ---- ! /* Sequential fast writes confuse my FT747 without this delay */ #define FT747_POST_WRITE_DELAY 5 *************** *** 66,70 **** ! /* MODES - when setting modes via cmd_mode_set() */ #define MODE_SET_LSB 0x00 --- 66,70 ---- ! /* Internal MODES - when setting modes via cmd_mode_set() */ #define MODE_SET_LSB 0x00 *************** *** 92,95 **** --- 92,97 ---- #define MODE_LSB 0x10 #define MODE_NAR 0x80 + + /* All relevent bits */ #define MODE_MASK 0x9f *************** *** 118,122 **** #define FT747_SUMO_DISPLAYED_MODE 0x18 #define FT747_SUMO_DISPLAYED_STATUS 0x00 ! #define FT747_SUMO_DISPLAYED_FREQ 0x00 --- 120,124 ---- #define FT747_SUMO_DISPLAYED_MODE 0x18 #define FT747_SUMO_DISPLAYED_STATUS 0x00 ! #define FT747_SUMO_DISPLAYED_FREQ 0x01 *************** *** 128,132 **** struct ft747_priv_data { unsigned char pacing; /* pacing value */ ! unsigned int read_update_delay; /* depends on pacing value */ unsigned char update_data[FT747_STATUS_UPDATE_DATA_LENGTH]; /* returned data */ }; --- 130,135 ---- struct ft747_priv_data { unsigned char pacing; /* pacing value */ ! unsigned int read_update_delay; /* depends on pacing value */ ! 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-11-25 08:20:08
|
Update of /cvsroot/hamlib/hamlib/ft747 In directory slayer.i.sourceforge.net:/tmp/cvs-serv12148 Modified Files: ft747.c Log Message: updated ptt/mode/vfo Index: ft747.c =================================================================== RCS file: /cvsroot/hamlib/hamlib/ft747/ft747.c,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** ft747.c 2000/10/16 22:27:11 1.19 --- ft747.c 2000/11/25 08:20:06 1.20 *************** *** 27,30 **** --- 27,43 ---- */ + + + /* + * TODO - FS + * + * 1. Rentrant code + * 2. rationalise code, more helper functions. + * + * + * + * + */ + #include <stdlib.h> #include <stdio.h> /* Standard input/output definitions */ *************** *** 81,85 **** const struct rig_caps ft747_caps = { RIG_MODEL_FT747, "FT-747GX", "Yaesu", "0.1", RIG_STATUS_ALPHA, ! RIG_TYPE_MOBILE, RIG_PTT_NONE, 4800, 4800, 8, 2, RIG_PARITY_NONE, RIG_HANDSHAKE_NONE, FT747_WRITE_DELAY, FT747_POST_WRITE_DELAY, 2000, 0,FT747_FUNC_ALL,0,0,20,RIG_TRN_OFF, { {100000,29999900,FT747_ALL_RX_MODES,-1,-1}, {0,0,0,0,0}, }, /* rx range */ --- 94,98 ---- const struct rig_caps ft747_caps = { RIG_MODEL_FT747, "FT-747GX", "Yaesu", "0.1", RIG_STATUS_ALPHA, ! RIG_TYPE_MOBILE, RIG_PTT_RIG, 4800, 4800, 8, 2, RIG_PARITY_NONE, RIG_HANDSHAKE_NONE, FT747_WRITE_DELAY, FT747_POST_WRITE_DELAY, 2000, 0,FT747_FUNC_ALL,0,0,20,RIG_TRN_OFF, { {100000,29999900,FT747_ALL_RX_MODES,-1,-1}, {0,0,0,0,0}, }, /* rx range */ *************** *** 183,189 **** */ ! /* *p = ft747_priv; */ - /* TODO: read pacing from preferences */ 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 */ --- 196,202 ---- */ ! ! /* TODO: read pacing from preferences */ 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 */ *************** *** 203,207 **** return -RIG_EINVAL; ! printf("ft747:ft747_cleanup called \n"); if (rig->state.priv) --- 216,220 ---- return -RIG_EINVAL; ! rig_debug(RIG_DEBUG_VERBOSE, "ft747: _cleanup called\n"); if (rig->state.priv) *************** *** 225,230 **** rig_s = &rig->state; ! printf("ft747:rig_open: write_delay = %i \n", rig_s->write_delay); ! printf("ft747:rig_open: post_write_delay = %i \n", rig_s->post_write_delay); --- 238,243 ---- rig_s = &rig->state; ! rig_debug(RIG_DEBUG_VERBOSE,"ft747:rig_open: write_delay = %i msec \n", rig_s->write_delay); ! rig_debug(RIG_DEBUG_VERBOSE,"ft747:rig_open: post_write_delay = %i msec \n", rig_s->post_write_delay); *************** *** 274,278 **** */ ! int ft747_set_mode(RIG *rig, rmode_t rmode) { struct rig_state *rig_s; struct ft747_priv_data *p; --- 287,291 ---- */ ! int ft747_set_mode(RIG *rig, rmode_t mode) { struct rig_state *rig_s; struct ft747_priv_data *p; *************** *** 293,299 **** */ ! printf("rmode = %x \n", rmode); ! switch(rmode) { case RIG_MODE_AM: mymode = MODE_SET_AMW; --- 306,312 ---- */ ! rig_debug(RIG_DEBUG_VERBOSE,"ft747: generic mode = %x \n", mode); ! switch(mode) { case RIG_MODE_AM: mymode = MODE_SET_AMW; *************** *** 310,328 **** case RIG_MODE_FM: mymode = MODE_SET_FMW; - break; - #if 0 - case RIG_MODE_NFM: - mymode = MODE_SET_FMN; - break; - case RIG_MODE_NCW: - mymode = MODE_SET_CWN; - break; - case RIG_MODE_NAM: - mymode = MODE_SET_AMN; break; ! case RIG_MODE_WAM: ! mymode = MODE_SET_AMW; ! break; ! #endif default: return -RIG_EINVAL; /* sorry, wrong MODE */ --- 323,328 ---- case RIG_MODE_FM: mymode = MODE_SET_FMW; break; ! default: return -RIG_EINVAL; /* sorry, wrong MODE */ *************** *** 331,339 **** cmd[3] = mymode; write_block(rig_s->fd, cmd, FT747_CMD_LENGTH, rig_s->write_delay, rig_s->post_write_delay); return RIG_OK; /* good */ } ! int ft747_get_mode(RIG *rig, rmode_t *rmode) { struct rig_state *rig_s; struct ft747_priv_data *p; --- 331,341 ---- 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 */ } ! int ft747_get_mode(RIG *rig, rmode_t *mode) { struct rig_state *rig_s; struct ft747_priv_data *p; *************** *** 348,383 **** ft747_get_update_data(rig); /* get whole shebang from rig */ ! mymode = p->update_data[FT747_STATUS_UPDATE_MODE_OFFSET]; ! mymode = mymode & 0x9f; /* mask out bits 5 and 6 */ ! printf("mymode = %x \n", mymode); switch(mymode) { case MODE_FM: ! (*rmode) = RIG_MODE_FM; break; case MODE_AM: ! (*rmode) = RIG_MODE_AM; break; case MODE_CW: ! (*rmode) = RIG_MODE_CW; break; case MODE_USB: ! (*rmode) = RIG_MODE_USB; break; case MODE_LSB: ! (*rmode) = RIG_MODE_LSB; break; ! #if 0 ! case MODE_FMN: ! (*rmode) = RIG_MODE_NFM; ! break; ! case MODE_AMN: ! (*rmode) = RIG_MODE_NAM; ! break; ! case MODE_CWN: ! (*rmode) = RIG_MODE_NCW; ! break; ! #endif default: return -RIG_EINVAL; /* sorry, wrong mode */ --- 350,384 ---- ft747_get_update_data(rig); /* get whole shebang from rig */ ! 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); ! ! /* ! * translate mode from ft747 to generic. ! */ switch(mymode) { case MODE_FM: ! (*mode) = RIG_MODE_FM; ! rig_debug(RIG_DEBUG_VERBOSE,"ft747: mode = FM \n"); break; case MODE_AM: ! (*mode) = RIG_MODE_AM; ! rig_debug(RIG_DEBUG_VERBOSE,"ft747: mode = AM \n"); break; case MODE_CW: ! (*mode) = RIG_MODE_CW; ! rig_debug(RIG_DEBUG_VERBOSE,"ft747: mode = CW \n"); break; case MODE_USB: ! (*mode) = RIG_MODE_USB; ! rig_debug(RIG_DEBUG_VERBOSE,"ft747: mode = USB \n"); break; case MODE_LSB: ! (*mode) = RIG_MODE_LSB; ! rig_debug(RIG_DEBUG_VERBOSE,"ft747: mode = LSB \n"); break; ! default: return -RIG_EINVAL; /* sorry, wrong mode */ *************** *** 426,430 **** int ft747_get_vfo(RIG *rig, vfo_t *vfo) { ! return -RIG_ENIMPL; } --- 427,461 ---- int ft747_get_vfo(RIG *rig, vfo_t *vfo) { ! struct rig_state *rig_s; ! struct ft747_priv_data *p; ! unsigned char status; /* ft747 status flag */ ! ! if (!rig) ! return -RIG_EINVAL; ! ! p = (struct ft747_priv_data*)rig->state.priv; ! rig_s = &rig->state; ! ! ft747_get_update_data(rig); /* get whole shebang from rig */ ! ! 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); ! ! /* ! * translate vfo status from ft747 to generic. ! */ ! ! if (status) { ! rig_debug(RIG_DEBUG_VERBOSE,"ft747: VFO = B \n"); ! (*vfo) = RIG_VFO_B; ! return RIG_OK; ! } else { ! rig_debug(RIG_DEBUG_VERBOSE,"ft747: VFO = A \n"); ! (*vfo) = RIG_VFO_A; ! return RIG_OK; ! } ! } *************** *** 456,464 **** int ft747_get_ptt(RIG *rig, ptt_t *ptt) { ! return -RIG_ENIMPL; } /* * private helper function. Retrieves update data from rig. --- 487,554 ---- int ft747_get_ptt(RIG *rig, ptt_t *ptt) { ! struct rig_state *rig_s; ! struct ft747_priv_data *p; ! unsigned char status; /* ft747 mode */ ! ! if (!rig) ! return -RIG_EINVAL; ! ! p = (struct ft747_priv_data*)rig->state.priv; ! rig_s = &rig->state; ! ! ft747_get_update_data(rig); /* get whole shebang from rig */ ! ! status = p->update_data[FT747_SUMO_DISPLAYED_STATUS]; ! status = status & SF_RXTX; /* check RXTX bit*/ ! ! rig_debug(RIG_DEBUG_VERBOSE,"ft747: ptt status = %x \n", status); ! ! /* ! * translate mode from ft747 to generic. ! */ ! ! if (status) { ! rig_debug(RIG_DEBUG_VERBOSE,"ft747: PTT = ON \n"); ! (*ptt) = RIG_PTT_ON; ! return RIG_OK; ! } else { ! rig_debug(RIG_DEBUG_VERBOSE,"ft747: PTT = OFF \n"); ! (*ptt) = RIG_PTT_OFF; ! return RIG_OK; ! } ! } + + #if 0 + + /* + * private helper function. Retrieves update data from rig. + * Uses ft747_get_update_data() to get status flag + */ + + static int ft747_get_status_flags(RIG *rig, int sf_order) { + struct rig_state *rig_s; + struct ft747_priv_data *p; + unsigned char status; /* ft747 status flags */ + + + if (!rig) + return -RIG_EINVAL; + + p = (struct ft747_priv_data*)rig->state.priv; + rig_s = &rig->state; + + ft747_get_update_data(rig); /* get whole shebang from rig */ + + status = p->update_data[FT747_STATUS_UPDATE_STATUS_OFFSET]; + + return status & SF_RXTX; + } + + #endif + /* * private helper function. Retrieves update data from rig. *************** *** 483,491 **** cmd_pace[3] = p->pacing; /* get pacing value */ ! printf("read pacing = %i \n",p->pacing); write_block(rig_s->fd, cmd_pace, FT747_CMD_LENGTH, rig_s->write_delay, rig_s->post_write_delay); ! printf("read timeout = %i \n",FT747_DEFAULT_READ_TIMEOUT); write_block(rig_s->fd, cmd_update, FT747_CMD_LENGTH, rig_s->write_delay, rig_s->post_write_delay); /* request data */ --- 573,581 ---- cmd_pace[3] = p->pacing; /* get pacing value */ ! rig_debug(RIG_DEBUG_VERBOSE,"ft747: read pacing = %i \n",p->pacing); write_block(rig_s->fd, cmd_pace, FT747_CMD_LENGTH, rig_s->write_delay, rig_s->post_write_delay); ! rig_debug(RIG_DEBUG_VERBOSE,"ft747: read timeout = %i \n",FT747_DEFAULT_READ_TIMEOUT); write_block(rig_s->fd, cmd_update, FT747_CMD_LENGTH, rig_s->write_delay, rig_s->post_write_delay); /* request data */ *************** *** 498,502 **** /* ! * Implement OPCODES */ --- 588,592 ---- /* ! * TODO: Implement these old OPCODES -- FS */ |
From: Frank S. <jav...@us...> - 2000-11-25 08:19:24
|
Update of /cvsroot/hamlib/hamlib/ft747 In directory slayer.i.sourceforge.net:/tmp/cvs-serv12086 Modified Files: ft747.h Log Message: updated ptt/mode/vfo Index: ft747.h =================================================================== RCS file: /cvsroot/hamlib/hamlib/ft747/ft747.h,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** ft747.h 2000/10/09 01:17:19 1.13 --- ft747.h 2000/11/25 08:19:21 1.14 *************** *** 1,6 **** /* ! * hamlib - (C) Frank Singleton 2000 (vk...@ix...) * ! * ft747.h - (C) Frank Singleton 2000 (vk...@ix...) * This shared library provides an API for communicating * via serial interface to an FT-747GX using the "CAT" interface --- 1,6 ---- /* ! * hamlib - (C) Frank Singleton 2000 (vk3fcs@@ix.netcom.com) * ! * ft747.h - (C) Frank Singleton 2000 (vk3fcs@@ix.netcom.com) * This shared library provides an API for communicating * via serial interface to an FT-747GX using the "CAT" interface *************** *** 92,103 **** #define MODE_LSB 0x10 #define MODE_NAR 0x80 /* ! * Some useful offsets in the status update map * */ ! #define FT747_STATUS_UPDATE_MODE_OFFSET 0x18 --- 92,122 ---- #define MODE_LSB 0x10 #define MODE_NAR 0x80 + #define MODE_MASK 0x9f /* ! * Status Flag Masks when reading ! */ ! ! #define SF_DLOCK 0x01 ! #define SF_SPLIT 0x02 ! #define SF_CLAR 0x04 ! #define SF_VFOAB 0x08 ! #define SF_VFOMR 0x10 ! #define SF_RXTX 0x20 ! #define SF_RESV 0x40 ! #define SF_PRI 0x80 ! ! ! ! ! /* ! * Some useful offsets in the status update map (offset) * */ ! #define FT747_SUMO_DISPLAYED_MODE 0x18 ! #define FT747_SUMO_DISPLAYED_STATUS 0x00 ! #define FT747_SUMO_DISPLAYED_FREQ 0x00 *************** *** 125,130 **** int ft747_get_freq(RIG *rig, freq_t *freq); ! int ft747_set_mode(RIG *rig, rmode_t rmode); /* select mode */ ! int ft747_get_mode(RIG *rig, rmode_t *rmode); /* get mode */ int ft747_set_vfo(RIG *rig, vfo_t vfo); /* select vfo */ --- 144,149 ---- 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 */ *************** *** 149,165 **** #undef TX_ENABLED - - /* - * Status Flags - */ - - #define SF_DLOCK 0x01 - #define SF_SPLIT 0x02 - #define SF_CLAR 0x04 - #define SF_VFOAB 0x08 - #define SF_VFOMR 0x10 - #define SF_RXTX 0x20 - #define SF_RESV 0x40 - #define SF_PRI 0x80 --- 168,171 ---- |
From: Stephane F. <f4...@us...> - 2000-11-17 19:11:59
|
Update of /cvsroot/hamlib/hamlib In directory slayer.i.sourceforge.net:/tmp/cvs-serv423 Added Files: NEWS Log Message: Initial release --- NEW FILE --- Hamlib -- History of visible changes. Copyright (C) 2000 Frank Singleton Copyright (C) 2000 Stephane Fillod Please send Hamlib bug reports to ham...@li... Version 1.1.0 2000-11-11 * First draft of a generic API, abstracting radios differences behind a set of capabilities. * Hamlib is (somewhat) conform to GNU coding standards, and so it uses configure script generated by Automake and Autoconf * Included hamlib-doc system to generate man pages, API references in html format. * 2 new backends: Icom (CI-V) with IC706 series, and AOR (AR8200) Version 1.0.0 Initial release. ------------------------------------------------------- Copying information: This file is licensed to you under the license specified in the included file `LICENSE'. Look there for further details. |
From: Stephane F. <f4...@us...> - 2000-11-04 21:37:33
|
Update of /cvsroot/hamlib/hamlib In directory slayer.i.sourceforge.net:/tmp/cvs-serv3037 Modified Files: INSTALL Log Message: new install notes, ala autoconf Index: INSTALL =================================================================== RCS file: /cvsroot/hamlib/hamlib/INSTALL,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** INSTALL 2000/07/18 21:35:26 1.1 --- INSTALL 2000/11/04 21:37:27 1.2 *************** *** 1,46 **** ! hamlib - (C) Frank Singleton 2000 (vk...@ix...) - - 1. You should be able to enter the tree (eg: ft747) of - choice and type "make".Here is what should happen. - - [frank@kirk ft747]$ make - gcc -fPIC -g -Wall -c ft747.c - gcc -shared -Wl,-soname,libft747.so.1 -o libft747.so.1.0.1 ft747.o -lc - [frank@kirk ft747]$ - - 2. To install the lib in the "./lib" directory, and its header file - into "./include" do "make install" - - [frank@kirk ft747]$ make install - make install_lib - make[1]: Entering directory `/home/frank/devel/hamlib/ft747' - mv libft747.so.1.0.1 ./lib/ - cd ./lib/; /sbin/ldconfig -n . - cd ./lib/; ln -s libft747.so.1 libft747.so - make[1]: Leaving directory `/home/frank/devel/hamlib/ft747' - make install_header - make[1]: Entering directory `/home/frank/devel/hamlib/ft747' - cp -f ft747.h ./include/ - make[1]: Leaving directory `/home/frank/devel/hamlib/ft747' - [frank@kirk ft747]$ - - 3. ./lib and ./include should now look like this - - |-- include - | `-- ft747.h - |-- lib - | |-- libft747.so -> libft747.so.1 - | |-- libft747.so.1 -> libft747.so.1.0.1 - | `-- libft747.so.1.0.1 - - - 4. To make and run the test suite , cd to test directory, build - the binary and run the test. - - cd test - make - make runtest - - 5. .. --- 1,161 ---- ! Basic Installation ! ================== + For more information specific to this package, please read the README + file. This source code distribution is autoconfiguring and you should be + able to compile it and install it without manual interventions such as + editing Makefiles, configuration files, and so on. These are generic + instructions for people who are not familiar with installing autoconfiguring + software. + + The simplest way to compile this package is to enter the source code + main directory and do the following: + + 1. Configure the source code by typing: + % sh ./configure + + If you're planning to install the package into your home directory + or to a location other than `/usr/local' then add the flag + `--prefix=PATH' to `configure'. For example, if your home directory + is `/home/luser' you can configure the package to install itself there + by invoking: + % sh ./configure --prefix=/home/luser + + While running, `configure' prints some messages telling which + features is it checking for. + + 2. Compile the package by typing: + % make + Running `make' takes a while. If this is a very large package, now + is the time to go make some coffee. + + 3. Some packages are bundled with self-tests for source-code + verification. If this package includes such tests, you can + optionally run them after compilation by typing + % make check + + 4. Type `make install' to install the programs and any data files and + documentation. Type `make uninstall' to undo the installation. + During installation, the following files go to the following directories: + Executables -> /prefix/bin + Libraries -> /prefix/lib + Public header files -> /prefix/include + Man pages -> /prefix/man/man? + Info files -> /prefix/info + Doc files -> /prefix/share/doc/<prog name> + Share files -> /prefix/share/<prog name> + where `prefix' is either `/usr/local' or the PATH that you specified + in the `--prefix' flag. + + If any of these directories do not presently exist, they will be + created on demand. + + If you are installing in your home directory make sure that + `/home/luser/bin' is in your path. If you're using the bash shell + add this line at the end of your .cshrc file: + PATH="/home/luser/bin:${PATH}" + export PATH + If you are using csh or tcsh, then use this line instead: + setenv PATH /home/luser/bin:${PATH} + By prepending your home directory to the rest of the PATH you can + override systemwide installed software with your own custom installation. + + 5. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. + + Compiler configuration + ====================== + + The `configure' shell script is responsible for choosing and configuring + the compiler(s). + + The following options allow you to specify whether you + want to enable or disable various debugging mechanisms: + + `--enable-warnings' + Make the compilers very picky about warnings. Try this whenever you + write new code since it may catch a few bugs. This is not active by + default because all too often warnings can be too picky and scare + the end-user. + + All programs are compiled with optimization level 2 by default (-O2). + Occasionally that confuses the debugger when code is inlined. To disable + optimization and enable debugging, set the shell environment variables + CFLAGS, CXXFLAGS, FFLAGS to `-g'. On the bash shell, you can do this + like this: + $ export CFLAGS="-g" + $ export CXXFLAGS="-g" + $ export FFLAGS="-g" + On the tcsh shell, use the `setenv' command instead: + % setenv CFLAGS "-g" + ...etc... + For other shell, please consult your shell's documentation. + + Similarly, you can increase the optimization level by assigning these + variables to "-g -O3". + + Depending on what languages the package uses, some of these options may + or may not be available. To see what is available, type: + % sh ./configure --help + + About the configure script + ========================== + + The `configure' shell script attempts to guess correct values for + various system-dependent variables used during compilation. It uses + those values to create a `Makefile' in each directory of the package. + It may also create one or more `.h' files containing system-dependent + definitions. Finally, it creates a shell script `config.status' that + you can run in the future to recreate the current configuration, a file + `config.cache' that saves the results of its tests to speed up + reconfiguring, and a file `config.log' containing compiler output + (useful mainly for debugging `configure'). + + If you need to do unusual things to compile the package, please try + to figure out how `configure' could check whether to do them, and mail + diffs or instructions to the address given in the `README' so they can + be considered for the next release. If at some point `config.cache' + contains results you don't want to keep, you may remove or edit it. + + The file `configure.in' is used to create `configure' by a program + called `autoconf'. You only need `configure.in' if you want to change + it or regenerate `configure' using a newer version of `autoconf'. + + Advanced installation options. + ============================== + + The `configure' script also understands the following more advanced + options, to handle situations for which `--prefix' alone is not sufficient. + + You can specify separate installation prefixes for + architecture-specific files and architecture-independent files. If you + give `configure' the option `--exec-prefix=PATH', the package will use + PATH as the prefix for installing programs and libraries. + Documentation and other data files will still use the regular prefix. + + In addition, if you use an unusual directory layout you can give + options like `--bindir=PATH' to specify different values for particular + kinds of files. Run `configure --help' for a list of the directories + you can set and what kinds of files go in them. + + If the package supports it, you can cause programs to be installed + with an extra prefix or suffix on their names by giving `configure' the + option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + + Optional Features + ================= + + Some packages pay attention to `--enable-FEATURE' options to + `configure', where FEATURE indicates an optional part of the package. + They may also pay attention to `--with-PACKAGE' options, where PACKAGE + is something like `gnu-as' or `x' (for the X Window System). The + `README' should mention any `--enable-' and `--with-' options that the + package recognizes. + + For packages that use the X Window System, `configure' can usually + find the X include and library files automatically, but if it doesn't, + you can use the `configure' options `--x-includes=DIR' and + `--x-libraries=DIR' to specify their locations. |
From: Stephane F. <f4...@us...> - 2000-11-04 21:36:01
|
Update of /cvsroot/hamlib/hamlib In directory slayer.i.sourceforge.net:/tmp/cvs-serv2932 Modified Files: AUTHORS Log Message: clarification on license Index: AUTHORS =================================================================== RCS file: /cvsroot/hamlib/hamlib/AUTHORS,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** AUTHORS 2000/10/01 21:38:56 1.1 --- AUTHORS 2000/11/04 21:35:57 1.2 *************** *** 1,5 **** ! Authors of the Hamlib API: Frank Singleton and Stephane Fillod Backends: --- 1,12 ---- ! This file is licensed to you under the license specified in the included file ! `COPYING'. Look there for further details. + Authors of the Hamlib API, original code: + Frank Singleton and Stephane Fillod + + + Contributors: + (if any is missing, please email the current maintainer). Backends: |
From: Stephane F. <f4...@us...> - 2000-11-02 21:07:49
|
Update of /cvsroot/hamlib/hamlib/kenwood In directory slayer.i.sourceforge.net:/tmp/cvs-serv19082/kenwood Log Message: Directory /cvsroot/hamlib/hamlib/kenwood added to the repository |
From: Stephane F. <f4...@us...> - 2000-11-01 23:27:28
|
Update of /cvsroot/hamlib/hamlib/tests In directory slayer.i.sourceforge.net:/tmp/cvs-serv10797 Modified Files: dumpcaps.c listrigs.c Log Message: * load/know more backends Index: dumpcaps.c =================================================================== RCS file: /cvsroot/hamlib/hamlib/tests/dumpcaps.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** dumpcaps.c 2000/10/22 16:14:53 1.5 --- dumpcaps.c 2000/11/01 23:27:26 1.6 *************** *** 44,49 **** } ! /* status = rig_load_backend("icom"); */ ! status = rig_load_backend("ft747"); if (status != RIG_OK ) { --- 44,51 ---- } ! status = rig_load_backend("icom"); ! status |= rig_load_backend("ft747"); ! status |= rig_load_backend("ft847"); ! status |= rig_load_backend("aor"); if (status != RIG_OK ) { *************** *** 128,132 **** } ! printf("Serial speed: %d..%dbauds, %d%c%d %s\n", caps->serial_rate_min, caps->serial_rate_max,caps->serial_data_bits, caps->serial_parity==RIG_PARITY_NONE?'N': --- 130,134 ---- } ! printf("Serial speed: %d..%d bauds, %d%c%d %s\n", caps->serial_rate_min, caps->serial_rate_max,caps->serial_data_bits, caps->serial_parity==RIG_PARITY_NONE?'N': Index: listrigs.c =================================================================== RCS file: /cvsroot/hamlib/hamlib/tests/listrigs.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** listrigs.c 2000/10/08 21:20:44 1.1 --- listrigs.c 2000/11/01 23:27:26 1.2 *************** *** 104,107 **** --- 104,112 ---- exit(3); } + status = rig_load_backend("aor"); + if (status != RIG_OK ) { + printf("rig_load_backend: aor error = %s \n", rigerror(status)); + exit(3); + } printf("Rig#\tMfg\tModel \tVers.\tStatus\tType\n"); |
From: Stephane F. <f4...@us...> - 2000-11-01 23:25:57
|
Update of /cvsroot/hamlib/hamlib/tests In directory slayer.i.sourceforge.net:/tmp/cvs-serv10611 Added Files: rigmatrix.c Log Message: Initial release ***** Error reading new file: (2, 'No such file or directory') |
From: Stephane F. <f4...@us...> - 2000-11-01 23:24:41
|
Update of /cvsroot/hamlib/hamlib/tests In directory slayer.i.sourceforge.net:/tmp/cvs-serv10515 Modified Files: Makefile.am Log Message: * added rigmatrix Index: Makefile.am =================================================================== RCS file: /cvsroot/hamlib/hamlib/tests/Makefile.am,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** Makefile.am 2000/10/29 16:31:31 1.5 --- Makefile.am 2000/11/01 23:24:39 1.6 *************** *** 1,14 **** ! bin_PROGRAMS = dumpcaps testrig testtrn testbcd listrigs rigctl LDADD = ../src/libhamlib.la ! listrigs_LDADD = ../src/libhamlib.la "-dlopen" ../icom/libhamlib-icom.la "-dlopen" ../ft747/libhamlib-ft747.la "-dlopen" ../ft847/libhamlib-ft847.la ! dumpcaps_LDADD = ../src/libhamlib.la "-dlopen" ../icom/libhamlib-icom.la "-dlopen" ../ft747/libhamlib-ft747.la "-dlopen" ../ft847/libhamlib-ft847.la testrig_LDADD = ../src/libhamlib.la "-dlopen" ../icom/libhamlib-icom.la "-dlopen" ../ft747/libhamlib-ft747.la "-dlopen" ../ft847/libhamlib-ft847.la testtrn_LDADD = ../src/libhamlib.la "-dlopen" ../icom/libhamlib-icom.la "-dlopen" ../ft747/libhamlib-ft747.la "-dlopen" ../ft847/libhamlib-ft847.la rigctl_LDADD = ../src/libhamlib.la "-dlopen" ../icom/libhamlib-icom.la "-dlopen" ../ft747/libhamlib-ft747.la "-dlopen" ../ft847/libhamlib-ft847.la ! dumpcaps_DEPENDENCIES = ../icom/libhamlib-icom.la ../ft747/libhamlib-ft747.la ../ft847/libhamlib-ft847.la testrig_DEPENDENCIES = ../icom/libhamlib-icom.la ../ft747/libhamlib-ft747.la ../ft847/libhamlib-ft847.la testtrn_DEPENDENCIES = ../icom/libhamlib-icom.la ../ft747/libhamlib-ft747.la ../ft847/libhamlib-ft847.la ! listrigs_DEPENDENCIES = ../icom/libhamlib-icom.la ../ft747/libhamlib-ft747.la ../ft847/libhamlib-ft847.la rigctl_DEPENDENCIES = ../icom/libhamlib-icom.la ../ft747/libhamlib-ft747.la ../ft847/libhamlib-ft847.la testrig_SOURCES = testrig.c testtrn_SOURCES = testtrn.c --- 1,17 ---- ! bin_PROGRAMS = dumpcaps testrig testtrn testbcd listrigs rigctl rigmatrix LDADD = ../src/libhamlib.la ! listrigs_LDADD = ../src/libhamlib.la "-dlopen" ../icom/libhamlib-icom.la "-dlopen" ../ft747/libhamlib-ft747.la "-dlopen" ../ft847/libhamlib-ft847.la "-dlopen" ../aor/libhamlib-aor.la ! dumpcaps_LDADD = ../src/libhamlib.la "-dlopen" ../icom/libhamlib-icom.la "-dlopen" ../ft747/libhamlib-ft747.la "-dlopen" ../ft847/libhamlib-ft847.la "-dlopen" ../aor/libhamlib-aor.la testrig_LDADD = ../src/libhamlib.la "-dlopen" ../icom/libhamlib-icom.la "-dlopen" ../ft747/libhamlib-ft747.la "-dlopen" ../ft847/libhamlib-ft847.la testtrn_LDADD = ../src/libhamlib.la "-dlopen" ../icom/libhamlib-icom.la "-dlopen" ../ft747/libhamlib-ft747.la "-dlopen" ../ft847/libhamlib-ft847.la rigctl_LDADD = ../src/libhamlib.la "-dlopen" ../icom/libhamlib-icom.la "-dlopen" ../ft747/libhamlib-ft747.la "-dlopen" ../ft847/libhamlib-ft847.la ! # rigmatrix needs also libgd ! rigmatrix_LDADD = -lgd ../src/libhamlib.la "-dlopen" ../icom/libhamlib-icom.la "-dlopen" ../ft747/libhamlib-ft747.la "-dlopen" ../ft847/libhamlib-ft847.la "-dlopen" ../aor/libhamlib-aor.la ! dumpcaps_DEPENDENCIES = ../icom/libhamlib-icom.la ../ft747/libhamlib-ft747.la ../ft847/libhamlib-ft847.la ../aor/libhamlib-aor.la testrig_DEPENDENCIES = ../icom/libhamlib-icom.la ../ft747/libhamlib-ft747.la ../ft847/libhamlib-ft847.la testtrn_DEPENDENCIES = ../icom/libhamlib-icom.la ../ft747/libhamlib-ft747.la ../ft847/libhamlib-ft847.la ! listrigs_DEPENDENCIES = ../icom/libhamlib-icom.la ../ft747/libhamlib-ft747.la ../ft847/libhamlib-ft847.la ../aor/libhamlib-aor.la rigctl_DEPENDENCIES = ../icom/libhamlib-icom.la ../ft747/libhamlib-ft747.la ../ft847/libhamlib-ft847.la + rigmatrix_DEPENDENCIES = ../icom/libhamlib-icom.la ../ft747/libhamlib-ft747.la ../ft847/libhamlib-ft847.la ../aor/libhamlib-aor.la testrig_SOURCES = testrig.c testtrn_SOURCES = testtrn.c *************** *** 17,18 **** --- 20,22 ---- listrigs_SOURCES = listrigs.c rigctl_SOURCES = rigctl.c + rigmatrix_SOURCES = rigmatrix.c |
From: Stephane F. <f4...@us...> - 2000-11-01 23:23:59
|
Update of /cvsroot/hamlib/hamlib/aor In directory slayer.i.sourceforge.net:/tmp/cvs-serv10451 Added Files: ar8200.c aor.c aor.h Makefile.am README.aor Log Message: Initial release ***** Error reading new file: (2, 'No such file or directory') ***** Error reading new file: (2, 'No such file or directory') ***** Error reading new file: (2, 'No such file or directory') --- NEW FILE --- lib_LTLIBRARIES = libhamlib-aor.la libhamlib_aor_la_SOURCES = ar8200.c aor.c libhamlib_aor_la_LDFLAGS = -avoid-version # -module lib_LIBRARIES = libhamlib-aor.a libhamlib_aor_a_SOURCES = ar8200.c aor.c noinst_HEADERS = aor.h --- NEW FILE --- hamlib - Copyright (C) 2000 Frank Singleton libaor.so - Copyright (C) 2000 Stephane Fillod This shared library provides an API for communicating via serial interface to an AOR scanner. Reference Documentation ----------------------- AOR RS232 protocol listing for the AR8200 (accompanies the CC8200) Document release V1.3 AOR Ltd. Status ------ This is a WIP. Handles 5% of all opcodes. All primitives are written from spec. In other words, they are totally untested because I don't own an AOR scanner myself. Patchs and contributions are welcome! I'm also looking for a real maintainer :) --SF This lib should/will support other AOR models. Warnings -------- 1. NOTHING IS WORKING, this is a WIP. Contributors ------------ |
From: Stephane F. <f4...@us...> - 2000-11-01 23:22:39
|
Update of /cvsroot/hamlib/hamlib/aor In directory slayer.i.sourceforge.net:/tmp/cvs-serv10379/aor Log Message: Directory /cvsroot/hamlib/hamlib/aor added to the repository |
From: Stephane F. <f4...@us...> - 2000-11-01 23:21:50
|
Update of /cvsroot/hamlib/hamlib/icom In directory slayer.i.sourceforge.net:/tmp/cvs-serv10301 Modified Files: frame.c frame.h Log Message: * some cleanup (removed deprecated make_cmd_frame_freq and make_cmd_frame_chan) Index: frame.c =================================================================== RCS file: /cvsroot/hamlib/hamlib/icom/frame.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** frame.c 2000/10/16 22:30:32 1.4 --- frame.c 2000/11/01 23:21:47 1.5 *************** *** 86,137 **** } - int make_cmd_frame_freq(char frame[], char re_id, char cmd, int subcmd, freq_t freq, int ic731_mode) - { - int freq_len; - int i = 0; - - frame[i++] = PAD; /* give old rigs a chance to flush their rx buffers */ - frame[i++] = PR; /* Preamble code */ - frame[i++] = PR; - frame[i++] = re_id; - frame[i++] = CTRLID; - frame[i++] = cmd; - if (subcmd != -1) - frame[i++] = subcmd & 0xff; - - freq_len = ic731_mode ? 4:5; - to_bcd(frame+i, freq, freq_len*2); /* to_bcd requires nibble len */ - - i += freq_len; - frame[i++] = FI; /* EOM code */ - - return i; - } - - /* - * for C_SET_MEM, subcmd=-1 - */ - int - make_cmd_frame_chan(char frame[], char re_id, char cmd, int subcmd, int chan) - { - int i = 0; - - frame[i++] = PAD; /* give old rigs a chance to flush their rx buffers */ - frame[i++] = PR; /* Preamble code */ - frame[i++] = PR; - frame[i++] = re_id; - frame[i++] = CTRLID; - frame[i++] = cmd; - if (subcmd != -1) - frame[i++] = subcmd & 0xff; - - to_bcd(frame+i, (freq_t)chan, 4); /* to_bcd requires nibble len */ - - i += 2; /* channel number is on 4 digits = 2 octets */ - frame[i++] = FI; /* EOM code */ - - return i; - } - /* * icom_transaction --- 86,89 ---- *************** *** 217,221 **** * read_icom_frame * read a whole CI-V frame (until 0xfd is encountered) ! * TODO: strips pading/collisions * FIXME: check return codes/bytes read */ --- 169,173 ---- * read_icom_frame * read a whole CI-V frame (until 0xfd is encountered) ! * TODO: strips padding/collisions * FIXME: check return codes/bytes read */ *************** *** 292,295 **** --- 244,248 ---- case S_LSB: mode = RIG_MODE_LSB; break; case S_RTTY: mode = RIG_MODE_RTTY; break; + case 0xff: mode = 0; break; /* blank mem channel */ default: Index: frame.h =================================================================== RCS file: /cvsroot/hamlib/hamlib/icom/frame.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** frame.h 2000/10/08 21:35:48 1.2 --- frame.h 2000/11/01 23:21:47 1.3 *************** *** 36,42 **** int make_cmd_frame(char frame[], char re_id, char cmd, int subcmd, const char *data, int data_len); - int make_cmd_frame_freq(char frame[], char re_id, char cmd, int subcmd, freq_t freq, int ic731_mode); - int make_cmd_frame_chan(char frame[], char re_id,char cmd,int subcmd,int chan); - int icom_transaction (RIG *rig, int cmd, int subcmd, const char *payload, int payload_len, char *data, int *data_len); int read_icom_frame(FILE *stream, unsigned char rxbuffer[], int timeout); --- 36,39 ---- |
From: Stephane F. <f4...@us...> - 2000-11-01 23:20:03
|
Update of /cvsroot/hamlib/hamlib/icom In directory slayer.i.sourceforge.net:/tmp/cvs-serv10129 Modified Files: README.icom Log Message: * misc changes Index: README.icom =================================================================== RCS file: /cvsroot/hamlib/hamlib/icom/README.icom,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** README.icom 2000/09/16 01:43:48 1.1 --- README.icom 2000/11/01 23:20:00 1.2 *************** *** 18,24 **** This is a WIP. ! Handles 1% of all opcodes Right now, this is just example of how a backend should glue ! with the generic rig API. This lib should/will support the ic706, ic706mkII, ic706mkIIG, and --- 18,25 ---- This is a WIP. ! Handles 30% of all opcodes. Right now, this is just example of how a backend should glue ! with the generic rig API. Some simple primitives work, ! some other are coded, but untested yet. This lib should/will support the ic706, ic706mkII, ic706mkIIG, and *************** *** 28,32 **** -------- ! 1. NOTHING IS WORKING, this is WIP. --- 29,33 ---- -------- ! 1. NOTHING IS WORKING, this is a WIP. |
From: Stephane F. <f4...@us...> - 2000-11-01 23:19:07
|
Update of /cvsroot/hamlib/hamlib In directory slayer.i.sourceforge.net:/tmp/cvs-serv10069 Modified Files: TODO Log Message: * done some work, still lot to do\! Index: TODO =================================================================== RCS file: /cvsroot/hamlib/hamlib/TODO,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** TODO 2000/10/12 18:37:56 1.10 --- TODO 2000/11/01 23:19:03 1.11 *************** *** 5,25 **** -------------------- ! 1. Implement more interfaces ! 2. Write More extensive Test Suites ! 3. Document API's 4. Document Limitations/Assumptions. - 5. Build top level Makefile for maintenance [ongoing] 6. Encourage people to build cool GUI's using our libs. (any GTK wiz's out here ..) ! 7. Move common routines to a common area ! and avoid duplication. [ongoing] ! 8. More safe checking during function calls. - 10. Improve Makefiles (autoconf?) - 11. Add some scanning routines - 12. Add general rig capabilities handling. see rig.h [ongoing] - 13. ~/.hamlibrc and /etc/hamlibrc preferences file --- 5,18 ---- -------------------- ! 1. Implement more interfaces/backends ! 2. Write More extensive Test Suites [ongoing] ! 3. Document API's [ongoing] 4. Document Limitations/Assumptions. 6. Encourage people to build cool GUI's using our libs. (any GTK wiz's out here ..) ! 8. More safe checking during function calls (in rig_* wrappers). 11. Add some scanning routines 13. ~/.hamlibrc and /etc/hamlibrc preferences file *************** *** 27,42 **** see common/API_Candidates file. ! 15. Handle retransmissions (no more than n) if timeout 16. Write .spec (rpm) and .deb (debian) package files ! 17. Add support for a configurable debug level (none, function calls, ! packet traces) [started] ! 17. In serial.c (and non serial too), use buffered IO instead of read/write, ! for better performance. Use flushing with fwrite. DONE ---- 9. If read from rig takes > "n" seconds, then no longer block on read, just return error. 18. Get CVS updates mailed to our hamlib-cvs-digest list --- 20,48 ---- see common/API_Candidates file. ! 15. Handle retransmissions (no more than n) if timeout (->backends) 16. Write .spec (rpm) and .deb (debian) package files ! 18. rewrite the post_write_delay. Active delay is a waste of cycles! ! DONE ---- + 5. Build top level Makefile for maintenance + + 7. Move common routines to a common area + and avoid duplication. + 9. If read from rig takes > "n" seconds, then no longer block on read, just return error. + + 10. Improve Makefiles (autoconf?) + + 12. Add general rig capabilities handling. see rig.h + + 17a. Add support for a configurable debug level (none, function calls, + packet traces) + + 17b. In serial.c (and non serial too), use buffered IO instead of read/write, + for better performance. Use flushing with fwrite. 18. Get CVS updates mailed to our hamlib-cvs-digest list |
From: Stephane F. <f4...@us...> - 2000-11-01 23:18:17
|
Update of /cvsroot/hamlib/hamlib In directory slayer.i.sourceforge.net:/tmp/cvs-serv10009 Modified Files: PLAN Log Message: * cosmetic changes Index: PLAN =================================================================== RCS file: /cvsroot/hamlib/hamlib/PLAN,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** PLAN 2000/09/16 01:08:32 1.2 --- PLAN 2000/11/01 23:18:11 1.3 *************** *** 1,27 **** ! Here is a non-exhaustive list of things IMO to keep in mind when ! developping the hamlib library. Plan: ---- ! o Hamlib is intended to provide the means to control any rig o develop the library as a shared/static library ! o portable (not only Linux, but UN*X, Win32 using cygwin,etc. -> autoconf?) ! o generic (any rig made, any model) ! o wrappable (Java, perl module, Python module, etc.) o support serial ports, IrDA ports, USB ports, network ports (w/ a daemon) o thread safe (reentrant) would be a must o support preference file (eg. /etc/hamlibrc, ~/.hamlibrc ) ! o written in C (C++ would have been more appropriate, but C is okay) o support more than one rig per application (ie. generic code) o support more than one rig per serial port (ie. Icoms) ! o handle serial retransmission and timeouts would be nice o i18n support if applicable o software compensation for the actual radio oscillator frequency errors(mode?) o if avail., support events sent by the rig (eg. main freq has been changed,..) o maybe add some misc functions like PTT signaling (through serial/parallel..) ! o Well documented API, and Howto write a new backend o ... --- 1,28 ---- ! Here is a non-exhaustive list of things IMO to keep in mind while ! developping the Hamlib library. Plan: ---- ! o Hamlib is intended to provide the means to control any capable rig o develop the library as a shared/static library ! o portable (not only Linux, but UN*X, Win32 using cygwin, etc. -> autoconf?) ! o be good, be generic (any rig made, any model) ! o uniform data types/units (eg. for power, use Watts, not rig specific val) ! o wrappable (Java, C++, perl module, Python module, etc.) o support serial ports, IrDA ports, USB ports, network ports (w/ a daemon) o thread safe (reentrant) would be a must o support preference file (eg. /etc/hamlibrc, ~/.hamlibrc ) ! o written in C (C++ would have been much more appropriate, but C is okay) o support more than one rig per application (ie. generic code) o support more than one rig per serial port (ie. Icoms) ! o handle nicely serial retransmission and timeouts o i18n support if applicable o software compensation for the actual radio oscillator frequency errors(mode?) o if avail., support events sent by the rig (eg. main freq has been changed,..) o maybe add some misc functions like PTT signaling (through serial/parallel..) ! o Well documented API, and Howto write a new rig backend o ... *************** *** 30,34 **** ---------------- o SANE, with frontend/backend scheme, dynamic loading, autoconf, etc. ! o struct net_device (Linux kernel) for the void *priv idea o any rigctrl sources out there ? --- 31,35 ---- ---------------- o SANE, with frontend/backend scheme, dynamic loading, autoconf, etc. ! o struct net_device (Linux kernel) for the "void *priv" idea o any rigctrl sources out there ? *************** *** 44,48 **** working code for this) it does 40 frames / sec and no load, really cool to see time and spectral info !! ! I have based it on generic data engine and plugins !! output also to small gtk window. o doppler compensation in tracking mode (using mtrack satellite tracker?) --- 45,49 ---- working code for this) it does 40 frames / sec and no load, really cool to see time and spectral info !! ! He has based it on generic data engine and plugins !! output also to small gtk window. o doppler compensation in tracking mode (using mtrack satellite tracker?) *************** *** 52,55 **** --- 53,57 ---- o software controlled hopping (poor mans GSM frequency hopping) also, must output hopping sequence to other rig to be useful + o computer assisted scanner o <add here the application you thought it'd be impossible> *************** *** 69,73 **** o freq ranges supported: rx/mode, tx/modes/power o number of VFO, operations (set VFO separately, VFO A=B, switch, ..) ! o freq granularity (resolution), tuning steps (-> array) o SCAN functions (start, stop, ..) o Split (cross band, duplex, ...) --- 71,75 ---- o freq ranges supported: rx/mode, tx/modes/power o number of VFO, operations (set VFO separately, VFO A=B, switch, ..) ! o freq granularity, tuning steps (-> array) o SCAN functions (start, stop, ..) o Split (cross band, duplex, ...) |
From: Stephane F. <f4...@us...> - 2000-11-01 23:16:47
|
Update of /cvsroot/hamlib/hamlib In directory slayer.i.sourceforge.net:/tmp/cvs-serv9793 Modified Files: Makefile.am configure.in configure Log Message: * added new AOR backend Index: Makefile.am =================================================================== RCS file: /cvsroot/hamlib/hamlib/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** Makefile.am 2000/10/22 15:50:09 1.2 --- Makefile.am 2000/11/01 23:16:41 1.3 *************** *** 1,2 **** EXTRA_DIST = COPYING INSTALL PLAN README THANKS TODO WANTED ! SUBDIRS = include src icom ft747 ft847 tests doc --- 1,2 ---- EXTRA_DIST = COPYING INSTALL PLAN README THANKS TODO WANTED ! SUBDIRS = include src icom ft747 ft847 aor tests doc Index: configure.in =================================================================== RCS file: /cvsroot/hamlib/hamlib/configure.in,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** configure.in 2000/10/29 10:15:20 1.4 --- configure.in 2000/11/01 23:16:41 1.5 *************** *** 88,92 **** AC_SUBST(DLL_PRELOAD) ! AC_OUTPUT( ft747/Makefile ft847/Makefile icom/Makefile Makefile \ ! include/Makefile include/hamlib/Makefile src/Makefile \ tests/Makefile doc/Makefile ) --- 88,93 ---- AC_SUBST(DLL_PRELOAD) ! AC_OUTPUT( ft747/Makefile ft847/Makefile icom/Makefile aor/Makefile \ ! Makefile include/Makefile include/hamlib/Makefile src/Makefile \ tests/Makefile doc/Makefile ) + Index: configure =================================================================== RCS file: /cvsroot/hamlib/hamlib/configure,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** configure 2000/10/29 10:15:20 1.4 --- configure 2000/11/01 23:16:41 1.5 *************** *** 2742,2747 **** ac_given_INSTALL="$INSTALL" ! trap 'rm -fr `echo "ft747/Makefile ft847/Makefile icom/Makefile Makefile \ ! include/Makefile include/hamlib/Makefile src/Makefile \ tests/Makefile doc/Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF --- 2742,2747 ---- ac_given_INSTALL="$INSTALL" ! trap 'rm -fr `echo "ft747/Makefile ft847/Makefile icom/Makefile aor/Makefile \ ! Makefile include/Makefile include/hamlib/Makefile src/Makefile \ tests/Makefile doc/Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF *************** *** 2848,2853 **** cat >> $CONFIG_STATUS <<EOF ! CONFIG_FILES=\${CONFIG_FILES-"ft747/Makefile ft847/Makefile icom/Makefile Makefile \ ! include/Makefile include/hamlib/Makefile src/Makefile \ tests/Makefile doc/Makefile "} EOF --- 2848,2853 ---- cat >> $CONFIG_STATUS <<EOF ! CONFIG_FILES=\${CONFIG_FILES-"ft747/Makefile ft847/Makefile icom/Makefile aor/Makefile \ ! Makefile include/Makefile include/hamlib/Makefile src/Makefile \ tests/Makefile doc/Makefile "} EOF *************** *** 3029,3031 **** --- 3029,3032 ---- rm -fr confdefs* $ac_clean_files test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 + |
From: Stephane F. <f4...@us...> - 2000-10-30 21:45:30
|
Update of /cvsroot/hamlib/hamlib/include/hamlib In directory slayer.i.sourceforge.net:/tmp/cvs-serv19747 Modified Files: rig.h Log Message: * misc fix of the size of immediate value (long long) Index: rig.h =================================================================== RCS file: /cvsroot/hamlib/hamlib/include/hamlib/rig.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** rig.h 2000/10/29 16:29:07 1.7 --- rig.h 2000/10/30 21:45:27 1.8 *************** *** 270,275 **** #define Hz(f) ((freq_t)(f)) #define KHz(f) ((freq_t)((f)*1000)) ! #define MHz(f) ((freq_t)((f)*1000000)) ! #define GHz(f) ((freq_t)((f)*1000000000)) /* --- 270,275 ---- #define Hz(f) ((freq_t)(f)) #define KHz(f) ((freq_t)((f)*1000)) ! #define MHz(f) ((freq_t)((f)*1000000L)) ! #define GHz(f) ((freq_t)((f)*1000000000LL)) /* *************** *** 278,282 **** #define mW(p) ((int)(p)) #define Watts(p) ((int)((p)*1000)) ! #define KW(p) ((int)((p)*1000000)) typedef unsigned int rmode_t; /* radio mode */ --- 278,282 ---- #define mW(p) ((int)(p)) #define Watts(p) ((int)((p)*1000)) ! #define KW(p) ((int)((p)*1000000L)) typedef unsigned int rmode_t; /* radio mode */ |
From: Stephane F. <f4...@us...> - 2000-10-29 16:35:32
|
Update of /cvsroot/hamlib/hamlib/tests In directory slayer.i.sourceforge.net:/tmp/cvs-serv24719 Added Files: rigctl.c Log Message: Initial release ***** Error reading new file: (2, 'No such file or directory') |
From: Stephane F. <f4...@us...> - 2000-10-29 16:31:33
|
Update of /cvsroot/hamlib/hamlib/tests In directory slayer.i.sourceforge.net:/tmp/cvs-serv24427 Modified Files: Makefile.am Log Message: * added rigctl Index: Makefile.am =================================================================== RCS file: /cvsroot/hamlib/hamlib/tests/Makefile.am,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** Makefile.am 2000/10/23 19:59:45 1.4 --- Makefile.am 2000/10/29 16:31:31 1.5 *************** *** 1,3 **** ! bin_PROGRAMS = dumpcaps testrig testtrn testbcd listrigs LDADD = ../src/libhamlib.la listrigs_LDADD = ../src/libhamlib.la "-dlopen" ../icom/libhamlib-icom.la "-dlopen" ../ft747/libhamlib-ft747.la "-dlopen" ../ft847/libhamlib-ft847.la --- 1,3 ---- ! bin_PROGRAMS = dumpcaps testrig testtrn testbcd listrigs rigctl LDADD = ../src/libhamlib.la listrigs_LDADD = ../src/libhamlib.la "-dlopen" ../icom/libhamlib-icom.la "-dlopen" ../ft747/libhamlib-ft747.la "-dlopen" ../ft847/libhamlib-ft847.la *************** *** 5,13 **** testrig_LDADD = ../src/libhamlib.la "-dlopen" ../icom/libhamlib-icom.la "-dlopen" ../ft747/libhamlib-ft747.la "-dlopen" ../ft847/libhamlib-ft847.la testtrn_LDADD = ../src/libhamlib.la "-dlopen" ../icom/libhamlib-icom.la "-dlopen" ../ft747/libhamlib-ft747.la "-dlopen" ../ft847/libhamlib-ft847.la ! listrigs_DEPENDENCIES = ../icom/libhamlib-icom.la ../ft747/libhamlib-ft747.la ../ft847/libhamlib-ft847.la dumpcaps_DEPENDENCIES = ../icom/libhamlib-icom.la ../ft747/libhamlib-ft747.la ../ft847/libhamlib-ft847.la testrig_DEPENDENCIES = ../icom/libhamlib-icom.la ../ft747/libhamlib-ft747.la ../ft847/libhamlib-ft847.la testtrn_DEPENDENCIES = ../icom/libhamlib-icom.la ../ft747/libhamlib-ft747.la ../ft847/libhamlib-ft847.la listrigs_DEPENDENCIES = ../icom/libhamlib-icom.la ../ft747/libhamlib-ft747.la ../ft847/libhamlib-ft847.la testrig_SOURCES = testrig.c testtrn_SOURCES = testtrn.c --- 5,14 ---- testrig_LDADD = ../src/libhamlib.la "-dlopen" ../icom/libhamlib-icom.la "-dlopen" ../ft747/libhamlib-ft747.la "-dlopen" ../ft847/libhamlib-ft847.la testtrn_LDADD = ../src/libhamlib.la "-dlopen" ../icom/libhamlib-icom.la "-dlopen" ../ft747/libhamlib-ft747.la "-dlopen" ../ft847/libhamlib-ft847.la ! rigctl_LDADD = ../src/libhamlib.la "-dlopen" ../icom/libhamlib-icom.la "-dlopen" ../ft747/libhamlib-ft747.la "-dlopen" ../ft847/libhamlib-ft847.la dumpcaps_DEPENDENCIES = ../icom/libhamlib-icom.la ../ft747/libhamlib-ft747.la ../ft847/libhamlib-ft847.la testrig_DEPENDENCIES = ../icom/libhamlib-icom.la ../ft747/libhamlib-ft747.la ../ft847/libhamlib-ft847.la testtrn_DEPENDENCIES = ../icom/libhamlib-icom.la ../ft747/libhamlib-ft747.la ../ft847/libhamlib-ft847.la listrigs_DEPENDENCIES = ../icom/libhamlib-icom.la ../ft747/libhamlib-ft747.la ../ft847/libhamlib-ft847.la + rigctl_DEPENDENCIES = ../icom/libhamlib-icom.la ../ft747/libhamlib-ft747.la ../ft847/libhamlib-ft847.la testrig_SOURCES = testrig.c testtrn_SOURCES = testtrn.c *************** *** 15,16 **** --- 16,18 ---- dumpcaps_SOURCES = dumpcaps.c listrigs_SOURCES = listrigs.c + rigctl_SOURCES = rigctl.c |
From: Stephane F. <f4...@us...> - 2000-10-29 16:30:45
|
Update of /cvsroot/hamlib/hamlib/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv24328 Modified Files: rig.c Log Message: * addded wrapper for rig_set_bank * misc fixups Index: rig.c =================================================================== RCS file: /cvsroot/hamlib/hamlib/src/rig.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** rig.c 2000/10/23 19:56:29 1.7 --- rig.c 2000/10/29 16:30:43 1.8 *************** *** 31,35 **** #include <hamlib/rig.h> #include <hamlib/riglist.h> ! #include "serial.h" #include "event.h" --- 31,35 ---- #include <hamlib/rig.h> #include <hamlib/riglist.h> ! #include <serial.h> #include "event.h" *************** *** 590,596 **** case RIG_PTT_SERIAL: case RIG_PTT_PARALLEL: case RIG_PTT_NONE: default: ! return -RIG_ENIMPL; /* not implemented */ } } --- 590,598 ---- case RIG_PTT_SERIAL: case RIG_PTT_PARALLEL: + return -RIG_ENIMPL; /* not implemented */ + case RIG_PTT_NONE: default: ! return -RIG_ENAVAIL; /* not available */ } } *************** *** 870,874 **** * SEE ALSO: rig_mW2power() */ ! int rig_power2mW(RIG *rig, unsigned int *mwpower, float power, freq_t freq, mode_t mode) { const freq_range_t *txrange; --- 872,876 ---- * SEE ALSO: rig_mW2power() */ ! int rig_power2mW(RIG *rig, unsigned int *mwpower, float power, freq_t freq, rmode_t mode) { const freq_range_t *txrange; *************** *** 885,889 **** return -RIG_ECONF; /* could be RIG_EINVAL ? */ } ! *mwpower = (unsigned long)(power*txrange->high_power); return RIG_OK; } else --- 887,891 ---- return -RIG_ECONF; /* could be RIG_EINVAL ? */ } ! *mwpower = (unsigned int)(power * txrange->high_power); return RIG_OK; } else *************** *** 912,916 **** * SEE ALSO: rig_power2mW() */ ! int rig_mW2power(RIG *rig, float *power, unsigned int mwpower, freq_t freq, mode_t mode) { const freq_range_t *txrange; --- 914,918 ---- * SEE ALSO: rig_power2mW() */ ! int rig_mW2power(RIG *rig, float *power, unsigned int mwpower, freq_t freq, rmode_t mode) { const freq_range_t *txrange; *************** *** 1393,1396 **** --- 1395,1426 ---- /** + * rig_set_bank - set the current memory bank + * @rig: The rig handle + * @bank: The memory bank + * + * The rig_set_bank() function sets the current memory bank. + * It is not mandatory for the radio to be in memory mode. Actually + * it depends on rigs. YMMV. + * + * RETURN VALUE: The rig_set_bank() function returns %RIG_OK + * if the operation has been sucessful, or a negative value + * if an error occured (in which case, cause is set appropriately). + * + * SEE ALSO: rig_set_mem() + */ + + int rig_set_bank(RIG *rig, int bank) + { + if (!rig || !rig->caps) + return -RIG_EINVAL; + + if (rig->caps->set_bank == NULL) + return -RIG_ENAVAIL; /* not implemented */ + else + return rig->caps->set_bank(rig, bank); + } + + + /** * rig_set_channel - set channel data * @rig: The rig handle *************** *** 1468,1474 **** return NULL; } ! if ((freq >= range_list[i].start && freq <= range_list[i].end) && (range_list[i].modes & mode)) { ! return (&range_list[i]); } } --- 1498,1504 ---- return NULL; } ! if (freq >= range_list[i].start && freq <= range_list[i].end && (range_list[i].modes & mode)) { ! return &range_list[i]; } } |
From: Stephane F. <f4...@us...> - 2000-10-29 16:29:14
|
Update of /cvsroot/hamlib/hamlib/include/hamlib In directory slayer.i.sourceforge.net:/tmp/cvs-serv24276 Modified Files: rig.h Log Message: * misc cleanup Index: rig.h =================================================================== RCS file: /cvsroot/hamlib/hamlib/include/hamlib/rig.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** rig.h 2000/10/23 19:53:03 1.6 --- rig.h 2000/10/29 16:29:07 1.7 *************** *** 283,286 **** --- 283,287 ---- /* 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) #define RIG_MODE_CW (1<<1) *************** *** 611,616 **** extern int rig_get_ts(RIG *rig, unsigned long *ts); /* get tuning step */ - extern int rig_set_power(RIG *rig, float power); - extern int rig_get_power(RIG *rig, float *power); 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); --- 612,615 ---- |
From: Stephane F. <f4...@us...> - 2000-10-29 16:27:39
|
Update of /cvsroot/hamlib/hamlib/icom In directory slayer.i.sourceforge.net:/tmp/cvs-serv24022 Modified Files: icom_defs.h Log Message: * defined some argument common lengths Index: icom_defs.h =================================================================== RCS file: /cvsroot/hamlib/hamlib/icom/icom_defs.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** icom_defs.h 2000/10/23 19:48:12 1.5 --- icom_defs.h 2000/10/29 16:27:37 1.6 *************** *** 44,47 **** --- 44,55 ---- #define S_NONE -1 + + /* + * Arguments length in bytes + */ + #define CHAN_NB_LEN 2 + #define BANK_NB_LEN 2 + #define OFFS_LEN 3 + /* * Cn controller commands |
From: Stephane F. <f4...@us...> - 2000-10-29 16:26:26
|
Update of /cvsroot/hamlib/hamlib/icom In directory slayer.i.sourceforge.net:/tmp/cvs-serv23991 Modified Files: icom.h Log Message: * added icom_set_rptr_offs/icom_get_rptr_offs, icom_set_split_freq/icom_get_split_freq and icom_set_split/icom_get_split Index: icom.h =================================================================== RCS file: /cvsroot/hamlib/hamlib/icom/icom.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** icom.h 2000/10/23 19:48:12 1.7 --- icom.h 2000/10/29 16:26:23 1.8 *************** *** 50,53 **** --- 50,59 ---- 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); |
From: Stephane F. <f4...@us...> - 2000-10-29 16:25:59
|
Update of /cvsroot/hamlib/hamlib/icom In directory slayer.i.sourceforge.net:/tmp/cvs-serv23855 Modified Files: icom.c Log Message: * added icom_set_rptr_offs/icom_get_rptr_offs, icom_set_split_freq/icom_get_split_freq and icom_set_split/icom_get_split * also fixed a bug in icom_set_mem, and icom_set_bank (invalid arg len) Index: icom.c =================================================================== RCS file: /cvsroot/hamlib/hamlib/icom/icom.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** icom.c 2000/10/23 19:48:12 1.8 --- icom.c 2000/10/29 16:25:56 1.9 *************** *** 327,330 **** --- 327,340 ---- */ freq_len--; + + /* + * is it a blank mem channel ? + */ + if (freq_len == 1 && freqbuf[0] == 0xff) { + *freq = -1; + + return RIG_OK; + } + if (freq_len != (priv->civ_731_mode ? 4:5)) { rig_debug(RIG_DEBUG_ERR,"icom_get_freq: wrong frame len=%d\n", *************** *** 738,741 **** --- 748,933 ---- /* + * icom_set_rptr_offs + * Assumes rig!=NULL, rig->state.priv!=NULL + */ + int icom_set_rptr_offs(RIG *rig, unsigned long rptr_offs) + { + struct icom_priv_data *priv; + struct rig_state *rig_s; + unsigned char offsbuf[16],ackbuf[16]; + int ack_len; + + rig_s = &rig->state; + priv = (struct icom_priv_data*)rig_s->priv; + + /* + * Icoms are using a 100Hz unit (at least on 706MKIIg) -- SF + */ + to_bcd(offsbuf, rptr_offs/100, OFFS_LEN*2); + + icom_transaction (rig, C_SET_OFFS, -1, offsbuf, OFFS_LEN, ackbuf, &ack_len); + + if (ack_len != 1 || ackbuf[0] != ACK) { + rig_debug(RIG_DEBUG_ERR,"icom_set_rptr_offs: ack NG (%#.2x), + len=%d\n", ackbuf[0],ack_len); + return -RIG_ERJCTED; + } + + return RIG_OK; + } + + + /* + * icom_get_rptr_offs + * 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; + struct rig_state *rig_s; + unsigned char offsbuf[16]; + int offs_len; + + rig_s = &rig->state; + priv = (struct icom_priv_data*)rig_s->priv; + + icom_transaction (rig, C_RD_OFFS, -1, NULL, 0, offsbuf, &offs_len); + + /* + * offsbuf should contain Cn + */ + offs_len--; + if (offs_len != OFFS_LEN) { + rig_debug(RIG_DEBUG_ERR,"icom_get_rptr_offs: wrong frame len=%d\n", + offs_len); + return -RIG_ERJCTED; + } + + /* + * Icoms are using a 100Hz unit (at least on 706MKIIg) -- SF + */ + *rptr_offs = from_bcd(offsbuf+1, offs_len*2)*100; + + return RIG_OK; + } + + + /* + * icom_set_split_freq + * Assumes rig!=NULL, rig->state.priv!=NULL, + * icom_set_vfo,icom_set_freq works for this rig + * 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; + } + + /* + * icom_get_split_freq + * Assumes rig!=NULL, rig->state.priv!=NULL, rx_freq!=NULL, tx_freq!=NULL + * icom_set_vfo,icom_get_freq works for this rig + * 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; + } + + /* + * icom_set_split + * Assumes rig!=NULL, rig->state.priv!=NULL + */ + int icom_set_split(RIG *rig, split_t split) + { + struct icom_priv_data *priv; + struct rig_state *rig_s; + unsigned char ackbuf[16]; + int ack_len; + int split_sc; + + rig_s = &rig->state; + priv = (struct icom_priv_data*)rig_s->priv; + + switch (split) { + case RIG_SPLIT_OFF: + split_sc = S_SPLT_OFF; + break; + case RIG_SPLIT_ON: + split_sc = S_SPLT_ON; + break; + default: + rig_debug(RIG_DEBUG_ERR,"Unsupported split %d", split); + return -RIG_EINVAL; + } + + icom_transaction (rig, C_CTL_SPLT, split_sc, NULL, 0, ackbuf, &ack_len); + + if (ack_len != 1 || ackbuf[0] != ACK) { + rig_debug(RIG_DEBUG_ERR,"icom_set_split: ack NG (%#.2x), + len=%d\n", ackbuf[0],ack_len); + return -RIG_ERJCTED; + } + + return RIG_OK; + } + + + /* + * icom_get_split + * Assumes rig!=NULL, rig->state.priv!=NULL, split!=NULL + */ + int icom_get_split(RIG *rig, split_t *split) + { + struct icom_priv_data *priv; + struct rig_state *rig_s; + unsigned char splitbuf[16]; + int split_len; + + rig_s = &rig->state; + priv = (struct icom_priv_data*)rig_s->priv; + + icom_transaction (rig, C_CTL_SPLT, -1, NULL, 0, splitbuf, &split_len); + + /* + * splitbuf should contain Cn,Sc + */ + split_len--; + if (split_len != 1) { + rig_debug(RIG_DEBUG_ERR,"icom_get_split: wrong frame len=%d\n", + split_len); + return -RIG_ERJCTED; + } + + switch (splitbuf[1]) { + case S_SPLT_OFF: + *split = RIG_SPLIT_OFF; + break; + case S_SPLT_ON: + *split = RIG_SPLIT_ON; + break; + default: + rig_debug(RIG_DEBUG_ERR,"Unsupported split %d", splitbuf[1]); + return -RIG_EPROTO; + } + + return RIG_OK; + } + + /* * icom_set_ts * Assumes rig!=NULL, rig->state.priv!=NULL *************** *** 965,970 **** priv = (struct icom_priv_data*)rig_s->priv; ! to_bcd_be(membuf, ch, 2); ! icom_transaction (rig, C_SET_MEM, -1, membuf, 2, ackbuf, &ack_len); if (ack_len != 1 || ackbuf[0] != ACK) { --- 1157,1162 ---- priv = (struct icom_priv_data*)rig_s->priv; ! to_bcd_be(membuf, ch, CHAN_NB_LEN*2); ! icom_transaction (rig, C_SET_MEM, -1, membuf, CHAN_NB_LEN, ackbuf, &ack_len); if (ack_len != 1 || ackbuf[0] != ACK) { *************** *** 992,997 **** priv = (struct icom_priv_data*)rig_s->priv; ! to_bcd_be(bankbuf, bank, 2); ! icom_transaction (rig, C_SET_MEM, S_BANK, bankbuf, 2, ackbuf, &ack_len); if (ack_len != 1 || ackbuf[0] != ACK) { --- 1184,1189 ---- priv = (struct icom_priv_data*)rig_s->priv; ! to_bcd_be(bankbuf, bank, BANK_NB_LEN*2); ! icom_transaction (rig, C_SET_MEM, S_BANK, bankbuf, CHAN_NB_LEN, ackbuf, &ack_len); if (ack_len != 1 || ackbuf[0] != ACK) { *************** *** 1066,1076 **** icom_transaction (rig, mv_cn, mv_sc, mvbuf, mv_len, ackbuf, &ack_len); - #if 0 if (ack_len != 1 || ackbuf[0] != ACK) { ! rig_debug(RIG_DEBUG_ERR,"icom_set_mem: ack NG (%#.2x), len=%d\n", ackbuf[0], ack_len); return -RIG_ERJCTED; } - #endif return RIG_OK; --- 1258,1266 ---- icom_transaction (rig, mv_cn, mv_sc, mvbuf, mv_len, ackbuf, &ack_len); if (ack_len != 1 || ackbuf[0] != ACK) { ! rig_debug(RIG_DEBUG_ERR,"icom_mv_ctl: ack NG (%#.2x), len=%d\n", ackbuf[0], ack_len); return -RIG_ERJCTED; } return RIG_OK; |