pull/425/head
Michael Black W9MDB 2020-10-15 15:44:43 -05:00
rodzic d15c4da091
commit 341828a319
3 zmienionych plików z 134 dodań i 121 usunięć

Wyświetl plik

@ -476,7 +476,8 @@ int ft817_init(RIG *rig)
{ {
struct ft817_priv_data *priv; struct ft817_priv_data *priv;
rig_debug(RIG_DEBUG_VERBOSE, "%s: called, version %s\n", __func__, rig->caps->version); rig_debug(RIG_DEBUG_VERBOSE, "%s: called, version %s\n", __func__,
rig->caps->version);
if ((rig->state.priv = calloc(1, sizeof(struct ft817_priv_data))) == NULL) if ((rig->state.priv = calloc(1, sizeof(struct ft817_priv_data))) == NULL)
{ {
@ -1112,7 +1113,7 @@ int ft817_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
&((struct ft817_priv_data *)rig->state.priv)->fm_status_tv); &((struct ft817_priv_data *)rig->state.priv)->fm_status_tv);
retval = ft817_send_icmd(rig, FT817_NATIVE_CAT_SET_FREQ, data); retval = ft817_send_icmd(rig, FT817_NATIVE_CAT_SET_FREQ, data);
hl_usleep(50*1000); // FT817 needs a little time after setting freq hl_usleep(50 * 1000); // FT817 needs a little time after setting freq
return retval; return retval;
} }
@ -1457,9 +1458,11 @@ int ft817_set_powerstat(RIG *rig, powerstat_t status)
case RIG_POWER_ON: case RIG_POWER_ON:
// send 5 bytes first, snooze a bit, then PWR_ON // send 5 bytes first, snooze a bit, then PWR_ON
write_block(&rig->state.rigport, (char *) p->pcs[FT817_NATIVE_CAT_PWR_WAKE].nseq, YAESU_CMD_LENGTH); write_block(&rig->state.rigport,
hl_usleep(200*1000); (char *) p->pcs[FT817_NATIVE_CAT_PWR_WAKE].nseq, YAESU_CMD_LENGTH);
write_block(&rig->state.rigport, (char *) p->pcs[FT817_NATIVE_CAT_PWR_ON].nseq, YAESU_CMD_LENGTH); hl_usleep(200 * 1000);
write_block(&rig->state.rigport, (char *) p->pcs[FT817_NATIVE_CAT_PWR_ON].nseq,
YAESU_CMD_LENGTH);
return RIG_OK; return RIG_OK;
case RIG_POWER_STANDBY: case RIG_POWER_STANDBY:

Wyświetl plik

@ -1148,10 +1148,14 @@ int newcat_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt)
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "%s", txoff); snprintf(priv->cmd_str, sizeof(priv->cmd_str), "%s", txoff);
rig_debug(RIG_DEBUG_TRACE, "%s: cmd_str = %s\n", __func__, priv->cmd_str); rig_debug(RIG_DEBUG_TRACE, "%s: cmd_str = %s\n", __func__, priv->cmd_str);
err = newcat_set_cmd(rig); err = newcat_set_cmd(rig);
// some rigs like the FT991 need time before doing anything else like set_freq
// We won't mess with CW mode -- no freq change expected hopefully // some rigs like the FT991 need time before doing anything else like set_freq
if (rig->state.current_mode != RIG_MODE_CW) // We won't mess with CW mode -- no freq change expected hopefully
hl_usleep(100*1000); if (rig->state.current_mode != RIG_MODE_CW)
{
hl_usleep(100 * 1000);
}
break; break;
default: default:
@ -3865,13 +3869,14 @@ int newcat_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
if (is_ft101 || is_ft5000) if (is_ft101 || is_ft5000)
{ {
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "PR0%d%c", status ? 1 : 0, snprintf(priv->cmd_str, sizeof(priv->cmd_str), "PR0%d%c", status ? 1 : 0,
cat_term); cat_term);
} }
else else
{ {
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "PR%d%c", status ? 1 : 0, snprintf(priv->cmd_str, sizeof(priv->cmd_str), "PR%d%c", status ? 1 : 0,
cat_term); cat_term);
} }
break; break;
case RIG_FUNC_VOX: case RIG_FUNC_VOX:
@ -3891,8 +3896,10 @@ int newcat_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
} }
// some rigs use AC02 to actually start tuning // some rigs use AC02 to actually start tuning
if (status == 1 && (is_ft101 || is_ft5000)) status = 2; if (status == 1 && (is_ft101 || is_ft5000)) { status = 2; }
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "AC00%d%c", status == 0 ? 0 : status,
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "AC00%d%c",
status == 0 ? 0 : status,
cat_term); cat_term);
break; break;
@ -4072,6 +4079,7 @@ int newcat_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status)
{ {
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "PR%c", cat_term); snprintf(priv->cmd_str, sizeof(priv->cmd_str), "PR%c", cat_term);
} }
break; break;
case RIG_FUNC_VOX: case RIG_FUNC_VOX:
@ -4133,11 +4141,13 @@ int newcat_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status)
break; break;
case RIG_FUNC_COMP: case RIG_FUNC_COMP:
// future Yaesu's may use the new command format // future Yaesu's may use the new command format
// so we do this check here instead of the back end // so we do this check here instead of the back end
// only need to add the "|| is_XXX" here // only need to add the "|| is_XXX" here
if (is_ft101) *status = (retfunc[1] == '0') ? 0 : 1; if (is_ft101) { *status = (retfunc[1] == '0') ? 0 : 1; }
else *status = (retfunc[0] == '0') ? 0 : 1; else { *status = (retfunc[0] == '0') ? 0 : 1; }
break; break;
case RIG_FUNC_ANF: case RIG_FUNC_ANF:

Wyświetl plik

@ -107,31 +107,31 @@ void never_used()
icom_mem_get_split_vfo(); icom_mem_get_split_vfo();
icom_mW2power(); icom_mW2power();
icom_power2mW(); icom_power2mW();
icom_send_morse(); icom_send_morse();
icom_send_voice_mem(); icom_send_voice_mem();
icom_set_bank(); icom_set_bank();
icom_set_ctcss_sql(); icom_set_ctcss_sql();
icom_set_ctcss_tone(); icom_set_ctcss_tone();
icom_set_dcs_code(); icom_set_dcs_code();
icom_set_dcs_sql(); icom_set_dcs_sql();
icom_set_dsp_flt(); icom_set_dsp_flt();
icom_set_ext_func(); icom_set_ext_func();
icom_set_ext_level(); icom_set_ext_level();
icom_set_ext_parm(); icom_set_ext_parm();
icom_set_func(); icom_set_func();
icom_set_level_raw(); icom_set_level_raw();
icom_set_mode_with_data(); icom_set_mode_with_data();
icom_set_parm(); icom_set_parm();
icom_set_powerstat(); icom_set_powerstat();
icom_set_ptt(); icom_set_ptt();
icom_set_rit_new(); icom_set_rit_new();
icom_set_rptr_offs(); icom_set_rptr_offs();
icom_set_rptr_shift(); icom_set_rptr_shift();
icom_set_split_freq_mode(); icom_set_split_freq_mode();
icom_set_xit_new(); icom_set_xit_new();
int2BCD(); int2BCD();
is_uh_radio_fd(); is_uh_radio_fd();
lockRx(); lockRx();
lt_dladdsearchdir(); lt_dladdsearchdir();
lt_dlclose(); lt_dlclose();
lt_dlerror(); lt_dlerror();
@ -141,8 +141,8 @@ lockRx();
lt_dlopenext(); lt_dlopenext();
lt_dlsym(); lt_dlsym();
miniVNA_get_info(); miniVNA_get_info();
modeToHamlib(); modeToHamlib();
modeToNative(); modeToNative();
newcat_decode_event(); newcat_decode_event();
newcat_get_dcd(); newcat_get_dcd();
newcat_get_dcs_code(); newcat_get_dcs_code();
@ -171,46 +171,46 @@ modeToNative();
newcat_set_split_mode(); newcat_set_split_mode();
newcat_set_tone(); newcat_set_tone();
newcat_set_tone_sql(); newcat_set_tone_sql();
optoscan_close(); optoscan_close();
optoscan_get_ctcss_tone(); optoscan_get_ctcss_tone();
optoscan_get_dcs_code(); optoscan_get_dcs_code();
optoscan_get_ext_parm(); optoscan_get_ext_parm();
optoscan_get_info(); optoscan_get_info();
optoscan_get_level(); optoscan_get_level();
optoscan_open(); optoscan_open();
optoscan_recv_dtmf(); optoscan_recv_dtmf();
optoscan_scan(); optoscan_scan();
optoscan_set_ext_parm(); optoscan_set_ext_parm();
optoscan_set_level(); optoscan_set_level();
pageSize(); pageSize();
pbsToHz(); pbsToHz();
pll_locked_p(); pll_locked_p();
ra37xx_cleanup(); ra37xx_cleanup();
ra37xx_close(); ra37xx_close();
ra37xx_get_ant(); ra37xx_get_ant();
ra37xx_get_conf(); ra37xx_get_conf();
ra37xx_get_freq(); ra37xx_get_freq();
ra37xx_get_func(); ra37xx_get_func();
ra37xx_get_info(); ra37xx_get_info();
ra37xx_get_level(); ra37xx_get_level();
ra37xx_get_mem(); ra37xx_get_mem();
ra37xx_get_mode(); ra37xx_get_mode();
ra37xx_init(); ra37xx_init();
ra37xx_open(); ra37xx_open();
ra37xx_scan(); ra37xx_scan();
ra37xx_set_ant(); ra37xx_set_ant();
ra37xx_set_conf(); ra37xx_set_conf();
ra37xx_set_freq(); ra37xx_set_freq();
ra37xx_set_func(); ra37xx_set_func();
ra37xx_set_level(); ra37xx_set_level();
ra37xx_set_mem(); ra37xx_set_mem();
ra37xx_set_mode(); ra37xx_set_mode();
ra37xx_vfo_op(); ra37xx_vfo_op();
read3Bytes(); read3Bytes();
read_info(); read_info();
readInt(); readInt();
readShort(); readShort();
readSignal(); readSignal();
rig_copy_channel(); rig_copy_channel();
rig_copyright(); rig_copyright();
rig_ext_token_lookup(); rig_ext_token_lookup();
@ -232,60 +232,60 @@ readSignal();
rig_version(); rig_version();
rot_probe_all(); rot_probe_all();
rot_unregister(); rot_unregister();
sendIRCode(); sendIRCode();
set_parm_all_cb_generic(); set_parm_all_cb_generic();
sprintf_level(); sprintf_level();
sprintf_level_ext(); sprintf_level_ext();
sprintf_parm(); sprintf_parm();
tentec_cleanup(); tentec_cleanup();
tentec_get_freq(); tentec_get_freq();
tentec_get_info(); tentec_get_info();
tentec_get_level(); tentec_get_level();
tentec_get_mode(); tentec_get_mode();
tentec_init(); tentec_init();
tentec_set_level(); tentec_set_level();
tentec_set_mode(); tentec_set_mode();
tentec_trx_open(); tentec_trx_open();
thd72_get_chan_all_cb(); thd72_get_chan_all_cb();
thd74_get_chan_all_cb(); thd74_get_chan_all_cb();
tt550_cleanup(); tt550_cleanup();
tt550_decode_event(); tt550_decode_event();
tt550_get_freq(); tt550_get_freq();
tt550_get_func(); tt550_get_func();
tt550_get_info(); tt550_get_info();
tt550_get_level(); tt550_get_level();
tt550_get_mode(); tt550_get_mode();
tt550_get_ptt(); tt550_get_ptt();
tt550_get_rit(); tt550_get_rit();
tt550_get_split_vfo(); tt550_get_split_vfo();
tt550_get_tuning_step(); tt550_get_tuning_step();
tt550_get_tx_freq(); tt550_get_tx_freq();
tt550_get_tx_mode(); tt550_get_tx_mode();
tt550_get_xit(); tt550_get_xit();
tt550_init(); tt550_init();
tt550_set_freq(); tt550_set_freq();
tt550_set_func(); tt550_set_func();
tt550_set_mode(); tt550_set_mode();
tt550_set_rit(); tt550_set_rit();
tt550_set_split_vfo(); tt550_set_split_vfo();
tt550_set_tuning_step(); tt550_set_tuning_step();
tt550_set_xit(); tt550_set_xit();
tt550_trx_open(); tt550_trx_open();
tt550_vfo_op(); tt550_vfo_op();
wj_cleanup(); wj_cleanup();
wj_get_conf(); wj_get_conf();
wj_get_freq(); wj_get_freq();
wj_get_level(); wj_get_level();
wj_get_mode(); wj_get_mode();
wj_init(); wj_init();
wj_set_conf(); wj_set_conf();
wj_set_freq(); wj_set_freq();
wj_set_level(); wj_set_level();
wj_set_mode(); wj_set_mode();
write3Bytes(); write3Bytes();
write_both_dacs(); write_both_dacs();
writeInt(); writeInt();
writeShort(); writeShort();
} }
main() main()