PyFT8 2.4.2__tar.gz → 2.4.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. {pyft8-2.4.2 → pyft8-2.4.3}/PKG-INFO +2 -1
  2. {pyft8-2.4.2 → pyft8-2.4.3}/PyFT8/pskr_upload.py +18 -12
  3. {pyft8-2.4.2 → pyft8-2.4.3}/PyFT8/pyft8.py +5 -3
  4. {pyft8-2.4.2 → pyft8-2.4.3}/PyFT8.egg-info/PKG-INFO +2 -1
  5. {pyft8-2.4.2 → pyft8-2.4.3}/README.md +1 -0
  6. {pyft8-2.4.2 → pyft8-2.4.3}/pyproject.toml +1 -1
  7. {pyft8-2.4.2 → pyft8-2.4.3}/LICENSE +0 -0
  8. {pyft8-2.4.2 → pyft8-2.4.3}/MANIFEST.in +0 -0
  9. {pyft8-2.4.2 → pyft8-2.4.3}/PyFT8/__init__.py +0 -0
  10. {pyft8-2.4.2 → pyft8-2.4.3}/PyFT8/callhashes.py +0 -0
  11. {pyft8-2.4.2 → pyft8-2.4.3}/PyFT8/gui.py +0 -0
  12. {pyft8-2.4.2 → pyft8-2.4.3}/PyFT8/receiver.py +0 -0
  13. {pyft8-2.4.2 → pyft8-2.4.3}/PyFT8/rigctrl.py +0 -0
  14. {pyft8-2.4.2 → pyft8-2.4.3}/PyFT8/time_utils.py +0 -0
  15. {pyft8-2.4.2 → pyft8-2.4.3}/PyFT8/transmitter.py +0 -0
  16. {pyft8-2.4.2 → pyft8-2.4.3}/PyFT8.egg-info/SOURCES.txt +0 -0
  17. {pyft8-2.4.2 → pyft8-2.4.3}/PyFT8.egg-info/dependency_links.txt +0 -0
  18. {pyft8-2.4.2 → pyft8-2.4.3}/PyFT8.egg-info/entry_points.txt +0 -0
  19. {pyft8-2.4.2 → pyft8-2.4.3}/PyFT8.egg-info/requires.txt +0 -0
  20. {pyft8-2.4.2 → pyft8-2.4.3}/PyFT8.egg-info/top_level.txt +0 -0
  21. {pyft8-2.4.2 → pyft8-2.4.3}/setup.cfg +0 -0
  22. {pyft8-2.4.2 → pyft8-2.4.3}/tests/dev/CQ AAAA.py +0 -0
  23. {pyft8-2.4.2 → pyft8-2.4.3}/tests/dev/osd.py +0 -0
  24. {pyft8-2.4.2 → pyft8-2.4.3}/tests/dev/test_generate_wav.py +0 -0
  25. {pyft8-2.4.2 → pyft8-2.4.3}/tests/dev/test_loopback_performance.py +0 -0
  26. {pyft8-2.4.2 → pyft8-2.4.3}/tests/dev/view_worked_before.py +0 -0
  27. {pyft8-2.4.2 → pyft8-2.4.3}/tests/plot_baseline.py +0 -0
  28. {pyft8-2.4.2 → pyft8-2.4.3}/tests/spare.py +0 -0
  29. {pyft8-2.4.2 → pyft8-2.4.3}/tests/test_batch_and_live.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PyFT8
3
- Version: 2.4.2
3
+ Version: 2.4.3
4
4
  Summary: FT8 Decoding and Encoding in Python with test/loopback code
5
5
  Author-email: G1OJS <g1ojs@yahoo.com>
6
6
  License-Expression: GPL-3.0-or-later
@@ -27,6 +27,7 @@ PyFT8 is somewhat experimental, with a focus on demonstrating FT8 written in Pyt
27
27
  If you're interested in how this works, maybe have a look at [MiniPyFT8](https://github.com/G1OJS/MiniPyFT8) which puts all of the receive code in a single 300 line Python file.
28
28
 
29
29
  ## Features
30
+ - Rx and Tx of standard messages with optional /P and /R, and nonstandard calls plus hashed calls
30
31
  - Doesn't try to do everything, so launches quickly (~2 seconds on my old Dell Optiplex 790)
31
32
  - Use with or without gui (receive and send messages via command line commands)
32
33
  - GUI provides simultaneous views of odd and even cycles
@@ -9,14 +9,16 @@ MAX_REPORTS = 90
9
9
  class PSKR_upload:
10
10
  # https://pskreporter.info/pskdev.html
11
11
  # https://pskreporter.info/cgi-bin/psk-analysis.pl
12
- def __init__(self, mycall, mygrid, software, tt, console_print):
12
+ def __init__(self, mycall, mygrid, software, console_print):
13
13
  self.RxInfoRecDescriptor_CallLocSoft = b"\x00\x03\x00\x24\x99\x92\x00\x03\x00\x01\x80\x02\xFF\xFF\x00\x00\x76\x8F\x80\x04\xFF\xFF\x00\x00\x76\x8F\x80\x08\xFF\xFF\x00\x00\x76\x8F\x00\x00"
14
14
  self.SenderInfoRecDescriptor_SenderFreqSNRiMDModeSourceTime = b"\x00\x02\x00\x3C\x99\x93\x00\x07\x80\x01\xFF\xFF\x00\x00\x76\x8F\x80\x05\x00\x04\x00\x00\x76\x8F\x80\x06\x00\x01\x00\x00\x76\x8F\x80\x07\x00\x01\x00\x00\x76\x8F\x80\x0A\xFF\xFF\x00\x00\x76\x8F\x80\x0B\x00\x01\x00\x00\x76\x8F\x00\x96\x00\x04"
15
- self.tt = tt
16
- self.includeDescriptors = 0
15
+ self.last_descriptors_time = 0
16
+ self.descriptors_sent_count = 0
17
17
  self.last_report_time = time.time() - 300 + 60
18
18
  self.addr = ("report.pskreporter.info", 4739)
19
19
  self.sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
20
+ #HOST = socket.gethostbyname(socket.gethostname())
21
+ #self.sock.bind((HOST, 1234))
20
22
  self.session_id = random.getrandbits(32)
21
23
  self.seq = 1
22
24
  self.reports = {}
@@ -45,22 +47,25 @@ class PSKR_upload:
45
47
  while True:
46
48
  time.sleep(60)
47
49
  with self.lock:
48
- n_reports = len(self.reports)
49
- if n_reports >= MAX_REPORTS or (time.time() - self.last_report_time) > 300:
50
- self._send(includeDescriptors = (time.time() - self.includeDescriptors) > 3600)
51
- self.includeDescriptors = time.time()
52
- self.last_report_time = time.time()
50
+ if len(self.reports) >= MAX_REPORTS or (time.time() - self.last_report_time) > 300:
51
+ if (time.time() - self.last_descriptors_time) > 3600:
52
+ self.descriptors_sent_count = 0
53
+ self.last_descriptors_time = time.time()
54
+ self._send(includeDescriptors = (self.descriptors_sent_count <4))
55
+ self.descriptors_sent_count +=1
53
56
 
54
57
  def _send(self, includeDescriptors = False):
55
58
  if not self.reports:
56
59
  return
57
- ipfx_header = struct.pack("!H", 10) + b"\x00\x00" + struct.pack("!I", self.tt) + struct.pack("!I", self.seq) + struct.pack("!I", self.session_id)
60
+ tt = int(time.time())
61
+ ipfx_header = struct.pack("!H", 10) + b"\x00\x00" + struct.pack("!I", tt) + struct.pack("!I", self.seq) + struct.pack("!I", self.session_id)
58
62
  header = ipfx_header
59
63
  if includeDescriptors:
64
+ print(f"[pskr_upload] Packing descriptors")
60
65
  header = header + self.RxInfoRecDescriptor_CallLocSoft + self.SenderInfoRecDescriptor_SenderFreqSNRiMDModeSourceTime
61
66
  senders = bytearray()
62
67
  for dxcall, freq_hz, snr, mode, source, tt in self.reports.values():
63
- print(f"Sending report {dxcall}, {freq_hz}, {snr}, {mode}, {source}, {tt}")
68
+ print(f"[pskr_upload] Packing report {dxcall}, {freq_hz}, {snr}, {mode}, {source}, {tt}")
64
69
  sender = self._enc_str(dxcall) + struct.pack("!I", int(freq_hz)) + struct.pack("b", int(snr)) + struct.pack("b", 0) + self._enc_str(mode) + struct.pack("B", source) + struct.pack("!I", tt)
65
70
  senders += sender
66
71
  packet = bytearray(header + self.rx_block + self._block(b"\x99\x93", senders))
@@ -71,8 +76,9 @@ class PSKR_upload:
71
76
  print(txt)
72
77
  self.console_print(txt)
73
78
  self.reports = {}
79
+ self.last_report_time = time.time()
74
80
 
75
81
 
76
- #pskr = PSKReporter('G1OJS', 'IO90ju', software = 'PyFT8', tt = int(time.time()))
82
+ #pskr = PSKR_upload('G1OJS', 'IO90ju', software = 'PyFT8', console_print = None)
77
83
  #pskr.add_report('G1OJS', 14074000, -5, 'FT8', 2, int(time.time()))
78
- #pskr.send(includeDescriptors = True)
84
+ #pskr._send(includeDescriptors = True)
@@ -11,7 +11,7 @@ from PyFT8.transmitter import AudioOut
11
11
  from PyFT8.time_utils import global_time_utils
12
12
  from PyFT8.rigctrl import Rig
13
13
 
14
- VER = '2.4.2'
14
+ VER = '2.4.3'
15
15
 
16
16
  MAX_TX_START_SECONDS = 2.5
17
17
  rig, gui, qso, worked_before, pskr_upload = None, None, None, None, None
@@ -209,16 +209,18 @@ def progress_qso(clicked_message):
209
209
  qso.clear()
210
210
  qso.times['time_on'] = time.gmtime()
211
211
  qso.oStation = {'c': call_b, 'g': grid_rpt}
212
+ qso.rpts['sent'] = f"{clicked_message.snr:+03d}"
212
213
  qso.set_tx_message(f"{qso.oStation['c']} {my_station['c']} {my_station['g']}")
213
214
  return
214
215
 
215
216
  if call_a == my_station['c']:
216
217
  if qso.times['time_on'] is None:
217
218
  qso.times['time_on'] = time.gmtime()
219
+ if qso.rpts['sent'] is None:
220
+ qso.rpts['sent'] = f"{clicked_message.snr:+03d}"
218
221
  qso.oStation['c'] = call_b
219
222
  if isGrid(grid_rpt):
220
223
  qso.oStation = {'c': call_b, 'g': grid_rpt}
221
- qso.rpts['sent'] = f"{clicked_message.snr:+03d}"
222
224
  reply = f"{qso.oStation['c']} {my_station['c']} {clicked_message.snr:+03d}"
223
225
  if isReport(grid_rpt):
224
226
  reply = f"{qso.oStation['c']} {my_station['c']} R{clicked_message.snr:+03d}"
@@ -323,7 +325,7 @@ def cli():
323
325
  mc, mg = config['station']['call'], config['station']['grid']
324
326
  if mc is not None and 'pskreporter' in config.keys():
325
327
  if config['pskreporter']['upload'] == 'Y':
326
- pskr_upload = PSKR_upload(mc, mg, software = f"PyFT8 v{VER}", tt = int(time.time()), console_print = console_print) if not mc is None else None
328
+ pskr_upload = PSKR_upload(mc, mg, software = f"PyFT8 v{VER}", console_print = console_print) if not mc is None else None
327
329
  console_print(f"[PyFT8] Spots will upload to pskreporter")
328
330
  qso = FT8_QSO(logging)
329
331
  rig = Rig(config)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PyFT8
3
- Version: 2.4.2
3
+ Version: 2.4.3
4
4
  Summary: FT8 Decoding and Encoding in Python with test/loopback code
5
5
  Author-email: G1OJS <g1ojs@yahoo.com>
6
6
  License-Expression: GPL-3.0-or-later
@@ -27,6 +27,7 @@ PyFT8 is somewhat experimental, with a focus on demonstrating FT8 written in Pyt
27
27
  If you're interested in how this works, maybe have a look at [MiniPyFT8](https://github.com/G1OJS/MiniPyFT8) which puts all of the receive code in a single 300 line Python file.
28
28
 
29
29
  ## Features
30
+ - Rx and Tx of standard messages with optional /P and /R, and nonstandard calls plus hashed calls
30
31
  - Doesn't try to do everything, so launches quickly (~2 seconds on my old Dell Optiplex 790)
31
32
  - Use with or without gui (receive and send messages via command line commands)
32
33
  - GUI provides simultaneous views of odd and even cycles
@@ -8,6 +8,7 @@ PyFT8 is somewhat experimental, with a focus on demonstrating FT8 written in Pyt
8
8
  If you're interested in how this works, maybe have a look at [MiniPyFT8](https://github.com/G1OJS/MiniPyFT8) which puts all of the receive code in a single 300 line Python file.
9
9
 
10
10
  ## Features
11
+ - Rx and Tx of standard messages with optional /P and /R, and nonstandard calls plus hashed calls
11
12
  - Doesn't try to do everything, so launches quickly (~2 seconds on my old Dell Optiplex 790)
12
13
  - Use with or without gui (receive and send messages via command line commands)
13
14
  - GUI provides simultaneous views of odd and even cycles
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "PyFT8"
3
- version = "2.4.2"
3
+ version = "2.4.3"
4
4
  license = "GPL-3.0-or-later"
5
5
 
6
6
  authors = [
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes