Skip to content

Commit 966fb52

Browse files
committed
Reset Split on QSY-Demand
1 parent 3cc88b7 commit 966fb52

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

main.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ function broadcastRadioStatus(radioData) {
634634
async function get_modes() {
635635
return new Promise((resolve) => {
636636
ipcMain.once('get_info_result', (event, modes) => {
637-
resolve(modes);
637+
resolve(modes ?? ['CW','LSB','USB']);
638638
});
639639
s_mainWindow.webContents.send('get_info', 'rig.get_modes');
640640
});
@@ -730,10 +730,12 @@ async function settrx(qrg, mode = '') {
730730
if (defaultcfg.profiles[defaultcfg.profile ?? 0].hamlib_ena) {
731731
const client = net.createConnection({ host: defaultcfg.profiles[defaultcfg.profile ?? 0].hamlib_host, port: defaultcfg.profiles[defaultcfg.profile ?? 0].hamlib_port }, () => {
732732
// Reset split mode before setting frequency
733-
client.write("S 0 VFOA\n");
733+
client.write("s\n"); // Check split ONCE, otherwise Reset won't work
734+
client.write("S 0 VFOA\n"); // Hamlib sometimes reacts, sometimes not, so:
735+
client.write("S 0 TX\n"); // Double Tap!
734736
client.write("F " + to.qrg + "\n");
735737
if (defaultcfg.profiles[defaultcfg.profile ?? 0].wavelog_pmode) {
736-
client.write("M " + to.mode + "\n-1");
738+
client.write("M " + to.mode + " 0\n");
737739
}
738740
client.end();
739741
});

0 commit comments

Comments
 (0)