Automatic symlink of /tmp/rig to the pseudo-terminal device. Also, we

now supply preference files for flrig to simplify setting up integration
to fldigi.
merge-requests/1/merge
Elliott Liggett 2020-03-23 14:58:31 -07:00
rodzic 6a1f53887b
commit acfb1556bf
4 zmienionych plików z 194 dodań i 2 usunięć

Wyświetl plik

@ -84,6 +84,8 @@ void commHandler::openPtPort()
// qDebug() << "opening pt port";
bool success;
char ptname[128];
int sysResult=0;
QString ptLinkCmd = "ln -s ";
success = pseudoterm->open(QIODevice::ReadWrite);
if(success)
{
@ -103,8 +105,17 @@ void commHandler::openPtPort()
// we're good!
qDebug() << "Opened pseudoterminal.";
qDebug() << "Slave name: " << ptsname(ptfd);
ptsname_r(ptfd, ptname, 128);
ptDevSlave = QString::fromLocal8Bit(ptname);
ptLinkCmd.append(ptDevSlave);
ptLinkCmd.append(" /tmp/rig");
sysResult = system("rm /tmp/rig");
sysResult = system(ptLinkCmd.toStdString().c_str());
if(sysResult)
{
qDebug() << "Received error from pseudo-terminal symlink command: code: [" << sysResult << "]" << " command: [" << ptLinkCmd << "]";
}
} else {
ptfd = 0;

Wyświetl plik

@ -0,0 +1,174 @@
; FLTK preferences file format 1.0
; vendor: w1hkj.com
; application: IC-7300
; This file goes in ~/.flrig/
; It is recommended that you make a backup of this file as flrig can
; change the file and at times invalidate the serial port entry.
; You can also chmod 444 the file to prevent accidental changes.
[.]
version:1.3.26
mainx:968
mainy:1155
mainw:735
mainh:150
uisize:0
;xcvr_serial_port:/dev/pts/1
xcvr_serial_port:/tmp/rig
comm_baudrate:9
comm_stopbits:1
comm_retries:1
comm_wait:5
comm_timeout:5
serloop_timing:200
byte_interval:0
comm_echo:1
ptt_via_cat:1
ptt_via_rts:0
ptt_via_dtr:0
rts_cts_flow:0
rts_plus:0
dtr_plus:0
civadr:148
usbaudio:1
aux_serial_port:NONE
aux_rts:0
aux_dtr:0
sep_serial_port:NONE
sep_rtsptt:0
sep_dtrptt:0
sep_rtsplus:0
set_dtrplus:0
poll_smeter:3
poll_frequency:1
poll_mode:1
poll_bandwidth:0
poll_volume:0
poll_auto_notch:0
poll_notch:0
poll_ifshift:0
poll_power_control:0
poll_pre_att:0
poll_micgain:0
poll_squelch:0
poll_rfgain:0
poll_pout:3
poll_swr:1
poll_alc:1
poll_split:0
poll_noise:0
poll_nr:0
poll_all:4
;bw_A:34
;mode_A:0
;freq_A:7070000
;bw_B:34
;mode_B:13
;freq_B:7070000
use_rig_data:1
restore_rig_data:0
bool_spkr_on:1
int_volume:0
dbl_power:90
int_mic:0
bool_notch:0
int_notch:0
bool_shift:0
int_shift:0
rfgain:88
squelch:10
schema:0
rx_avg:5
rx_peak:5
pwr_avg:5
pwr_peak:5
pwr_scale:4
ft950_rg_reverse:0
line_out:0
data_port:0
vox_on_dataport:1
agc_level:1
cw_wpm:18
cw_weight:3
cw_vol:0
cw_spot:0
spot_onoff:0
cw_spot_tone:700
cw_qsk:15
enable_keyer:0
vox_onoff:0
vox_gain:10
vox_anti:10
vox_hang:100
compression:0
compON:0
noise_reduction:0
noise_red_val:0
nb_level:0
bool_noise:0
int_preamp:0
int_att:0
vfo_adj:0
bfo_freq:600
rit_freq:0
xit_freq:0
bpf_center:1500
use_bpf_center:1
fg_red:0
fg_green:0
fg_blue:0
bg_red:232
bg_green:255
bg_blue:232
smeter_red:0
smeter_green:180
smeter_blue:0
power_red:180
power_green:0
power_blue:0
swr_red:148
swr_green:0
swr_blue:148
peak_red:255
peak_green:0
peak_blue:0
fg_sys_red:0
fg_sys_green:0
fg_sys_blue:0
bg_sys_red:192
bg_sys_green:192
bg_sys_blue:192
bg2_sys_red:255
bg2_sys_green:255
bg2_sys_blue:255
slider_red:232
slider_green:255
slider_blue:232
slider_btn_red:0
slider_btn_green:0
slider_btn_blue:128
lighted_btn_red:255
lighted_btn_green:255
lighted_btn_blue:0
fontnbr:4
tooltips:0
ui_scheme:gtk+
server_port:7362
server_addr:127.0.0.1
tcpip_port:4001
tcpip_addr:127.0.0.1
tcpip_ping_delay:50
tcpip_tcpip_reconnect_after:10
tcpip_drops_allowed:10
use_tcpip:0
xcvr_auto_on:0
xcvr_auto_off:0
external_tuner:0
fldigi_is_server:0
hrd_buttons:1
bw_A:34
mode_A:0
freq_A:7070000
bw_B:34
mode_B:1
freq_B:7070000

Wyświetl plik

@ -0,0 +1,7 @@
; FLTK preferences file format 1.0
; vendor: w1hkj.com
; application: flrig
[.]
xcvr_name:IC-7300

Wyświetl plik

@ -684,7 +684,7 @@ void wfmain::shortcutPageUp()
{
emit setFrequency(this->freqMhz + 1.0);
cmdOutQue.append(cmdGetFreq);
cmdOutQue.append(cmdGetMode); // maybe not really needed.
//cmdOutQue.append(cmdGetMode); // maybe not really needed.
delayedCommand->start();
}
@ -692,7 +692,7 @@ void wfmain::shortcutPageDown()
{
emit setFrequency(this->freqMhz - 1.0);
cmdOutQue.append(cmdGetFreq);
cmdOutQue.append(cmdGetMode); // maybe not really needed.
//cmdOutQue.append(cmdGetMode); // maybe not really needed.
delayedCommand->start();
}