[Hamlib-cvs-digest] CVS: hamlib/icom ic706.c,1.9,1.10 icom.h,1.10,1.11
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: Stephane F. <f4...@us...> - 2001-01-28 22:06:20
|
Update of /cvsroot/hamlib/hamlib/icom In directory usw-pr-cvs1:/tmp/cvs-serv821 Modified Files: ic706.c icom.h Log Message: * added S-Meter calibration data * added set_func capability Index: ic706.c =================================================================== RCS file: /cvsroot/hamlib/hamlib/icom/ic706.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** ic706.c 2001/01/05 18:18:50 1.9 --- ic706.c 2001/01/28 22:06:11 1.10 *************** *** 62,66 **** */ const struct rig_caps ic706_caps = { ! RIG_MODEL_IC706, "IC-706", "Icom", "0.2", RIG_STATUS_ALPHA, RIG_TYPE_MOBILE, RIG_PTT_NONE, 300, 19200, 8, 1, RIG_PARITY_NONE, RIG_HANDSHAKE_NONE, 0, 0, 2000, 3, IC706_FUNC_ALL, IC706_LEVEL_ALL, --- 62,66 ---- */ const struct rig_caps ic706_caps = { ! RIG_MODEL_IC706, "IC-706", "Icom", "0.2", RIG_STATUS_UNTESTED, RIG_TYPE_MOBILE, RIG_PTT_NONE, 300, 19200, 8, 1, RIG_PARITY_NONE, RIG_HANDSHAKE_NONE, 0, 0, 2000, 3, IC706_FUNC_ALL, IC706_LEVEL_ALL, *************** *** 109,113 **** const struct rig_caps ic706mkii_caps = { ! RIG_MODEL_IC706MKII, "IC-706MKII", "Icom", "0.2", RIG_STATUS_ALPHA, RIG_TYPE_MOBILE, RIG_PTT_NONE, 300, 19200, 8, 1, RIG_PARITY_NONE, RIG_HANDSHAKE_NONE, 0, 0, 2000, 3, IC706_FUNC_ALL, IC706_LEVEL_ALL, --- 109,113 ---- const struct rig_caps ic706mkii_caps = { ! RIG_MODEL_IC706MKII, "IC-706MKII", "Icom", "0.2", RIG_STATUS_UNTESTED, RIG_TYPE_MOBILE, RIG_PTT_NONE, 300, 19200, 8, 1, RIG_PARITY_NONE, RIG_HANDSHAKE_NONE, 0, 0, 2000, 3, IC706_FUNC_ALL, IC706_LEVEL_ALL, *************** *** 218,221 **** --- 218,222 ---- set_level: icom_set_level, get_level: icom_get_level, + set_func: icom_set_func, set_channel: icom_set_channel, get_channel: icom_get_channel, *************** *** 241,243 **** --- 242,269 ---- */ + static const int mkiig_raw[STR_CAL_LENGTH] = { + 100, 104, 108, 111, 114, 118, 121, 125, 129, 133, 137, 142, 146, 151, 156, 161 + }; + static const int mkiig_db[STR_CAL_LENGTH] = { + -18, -16, -14, -12, -10, -8, -6, -4, -2, 0, 2, 4, 6, 8, 10, 12 + }; + + /* + * called by icom_init + * assume rig!=NULL, rig->state.priv!=NULL + */ + int ic706mkiig_str_cal_init(RIG *rig) + { + int i; + struct icom_priv_data *p = (struct icom_priv_data *)rig->state.priv; + + /* + * initialize the S Meter calibration table + */ + for (i=0; i<STR_CAL_LENGTH; i++) { + p->str_cal_raw[i] = mkiig_raw[i]; + p->str_cal_db[i] = mkiig_db[i]; + } + return RIG_OK; + } Index: icom.h =================================================================== RCS file: /cvsroot/hamlib/hamlib/icom/icom.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** icom.h 2000/12/05 22:01:02 1.10 --- icom.h 2001/01/28 22:06:11 1.11 *************** *** 31,35 **** --- 31,43 ---- #include <hamlib/rig.h> + /* + * defines used by comp_cal_str in rig.c + * STR_CAL_LENGTH is the lenght of the S Meter calibration table + * STR_CAL_S0 is the value in dB of the lowest value (not even in table) + */ + #define STR_CAL_LENGTH 16 + #define STR_CAL_S0 -54 + struct ts_sc_list { shortfreq_t ts; /* tuning step */ *************** *** 41,44 **** --- 49,54 ---- int civ_731_mode; /* Off: freqs on 10 digits, On: freqs on 8 digits */ const struct ts_sc_list *ts_sc_list; + int str_cal_raw[STR_CAL_LENGTH]; + int str_cal_db[STR_CAL_LENGTH]; }; *************** *** 67,70 **** --- 77,81 ---- 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_func(RIG *rig, vfo_t vfo, setting_t func, int status); int icom_set_channel(RIG *rig, const channel_t *chan); int icom_get_channel(RIG *rig, channel_t *chan); *************** *** 76,79 **** --- 87,91 ---- extern const struct rig_caps ic706mkii_caps; extern const struct rig_caps ic706mkiig_caps; + extern const struct rig_caps icr8500_caps; extern int init_icom(void *be_handle); |