Skip to content

Commit 8f1cd69

Browse files
authored
Merge pull request #239 from mbridak/change_fldigi_qso_detection
Change fldigi qso detection
2 parents 326c56d + 24b4202 commit 8f1cd69

File tree

7 files changed

+25
-49
lines changed

7 files changed

+25
-49
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Changelog
22

3+
- [24-12-14] Changed method of detecting fldigi QSOs. See docs.
34
- [24-12-12] Add a try exception for a unicode decode error.
45
- [24-12-11-1] Add RTC to RAC Canada Day, ARRL VHF, ARRL Field Day, ARRL SS, ARRL DX, 10 10
56
- [24-12-11] Add RTC to IARU HF, IARU Field Day, DARC XMAS, CQ WW, CQ WPX

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ generated, 'cause I'm lazy, list of those who've submitted PR's.
208208

209209
## Recent Changes (Polishing the Turd)
210210

211+
- [24-12-14] Changed method of detecting fldigi QSOs. See docs.
211212
- [24-12-12] Add a try exception for a unicode decode error.
212213
- [24-12-11-1] Add RTC to RAC Canada Day, ARRL VHF, ARRL Field Day, ARRL SS, ARRL DX, 10 10
213214
- [24-12-11] Add RTC to IARU HF, IARU Field Day, DARC XMAS, CQ WW, CQ WPX
@@ -607,9 +608,13 @@ On the Options TAB you can:
607608
not1mm listens for WSJT-X UDP traffic on the Multicast address 224.0.0.1:2237.
608609
No setup is needed to be done on not1mm's side. That's good because I'm lazy.
609610

610-
not1mm polls for fldigi QSOs via it's XMLRPC interface. It does this in a rather stupid
611+
~~not1mm polls for fldigi QSOs via it's XMLRPC interface. It does this in a rather stupid
611612
way. It just keeps asking what was the last QSO and compares it to the previous response.
612-
If it's different, it's new.
613+
If it's different, it's new.~~
614+
615+
not1mm watches for fldigi qso's by watching for UDP traffic from fldigi on 127.0.0.1:9876.
616+
617+
![fldigi configuration dialog](https://github.com/mbridak/not1mm/blob/master/pic/fldigi_adif_udp.png?raw=true)
613618

614619
The F1-F12 function keys be sent to fldigi via XMLRPC. Fldigi will be placed into TX
615620
mode, the message will be sent and a ^r will be tacked onto the end to place it back into

not1mm/__main__.py

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
print(exception)
3434
print("portaudio is not installed")
3535
sd = None
36-
from PyQt6 import QtCore, QtGui, QtWidgets, uic
36+
from PyQt6 import QtCore, QtGui, QtWidgets, uic, QtNetwork
3737
from PyQt6.QtCore import QDir, Qt, QThread, QSettings, QCoreApplication
3838
from PyQt6.QtGui import QFontDatabase, QColorConstants, QPalette, QColor, QPixmap
3939
from PyQt6.QtWidgets import QFileDialog, QSplashScreen, QApplication
@@ -66,7 +66,6 @@
6666
from not1mm.lib.version import __version__
6767
from not1mm.lib.versiontest import VersionTest
6868
from not1mm.lib.ft8_watcher import FT8Watcher
69-
from not1mm.lib.fldigi_watcher import FlDigiWatcher
7069
from not1mm.lib.fldigi_sendstring import FlDigi_Comm
7170

7271
import not1mm.fsutils as fsutils
@@ -174,10 +173,8 @@ class MainWindow(QtWidgets.QMainWindow):
174173

175174
radio_thread = QThread()
176175
voice_thread = QThread()
177-
fldigi_thread = QThread()
178176
rtc_thread = QThread()
179177

180-
fldigi_watcher = None
181178
rig_control = None
182179
log_window = None
183180
check_window = None
@@ -668,14 +665,6 @@ def __init__(self, splash):
668665
self.show_splash_msg("Reading macros.")
669666
self.read_macros()
670667

671-
self.show_splash_msg("Starting FlDigi watcher.")
672-
self.fldigi_watcher = FlDigiWatcher()
673-
self.fldigi_watcher.moveToThread(self.fldigi_thread)
674-
self.fldigi_thread.started.connect(self.fldigi_watcher.run)
675-
self.fldigi_thread.finished.connect(self.fldigi_watcher.deleteLater)
676-
self.fldigi_watcher.poll_callback.connect(self.fldigi_qso)
677-
self.fldigi_thread.start()
678-
679668
self.show_splash_msg("Restoring window states.")
680669
self.settings = QSettings("K6GTE", "not1mm")
681670
if self.settings.value("windowState") is not None:
@@ -718,6 +707,20 @@ def __init__(self, splash):
718707
"You can udate to the current version by using:\npip install -U not1mm"
719708
)
720709

710+
self.udp_socket = QtNetwork.QUdpSocket()
711+
b_result = self.udp_socket.bind(
712+
QtNetwork.QHostAddress.SpecialAddress.AnyIPv4, 9876
713+
)
714+
logger.info(f"bind {b_result}")
715+
self.udp_socket.readyRead.connect(self.fldigi_on_udp_socket_ready_read)
716+
717+
def fldigi_on_udp_socket_ready_read(self):
718+
""""""
719+
datagram, sender_host, sender_port_number = self.udp_socket.readDatagram(
720+
self.udp_socket.pendingDatagramSize()
721+
)
722+
self.fldigi_qso(datagram.decode())
723+
721724
def load_call_history(self) -> None:
722725
"""Display filepicker and load chosen call history file."""
723726
filename = self.filepicker("other")

not1mm/lib/fldigi_watcher.py

Lines changed: 0 additions & 33 deletions
This file was deleted.

not1mm/lib/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""It's the version"""
22

3-
__version__ = "24.12.12"
3+
__version__ = "24.12.14"

pic/fldigi_adif_udp.png

59 KB
Loading

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "not1mm"
7-
version = "24.12.12"
7+
version = "24.12.14"
88
description = "NOT1MM Logger"
99
readme = "README.md"
1010
requires-python = ">=3.9"

0 commit comments

Comments
 (0)