PyFT8 2.7.3__tar.gz → 2.7.5__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 (32) hide show
  1. {pyft8-2.7.3 → pyft8-2.7.5}/PKG-INFO +1 -1
  2. {pyft8-2.7.3 → pyft8-2.7.5}/PyFT8/gui.py +1 -1
  3. {pyft8-2.7.3 → pyft8-2.7.5}/PyFT8/mqtt.py +13 -15
  4. {pyft8-2.7.3 → pyft8-2.7.5}/PyFT8/pyft8.py +10 -6
  5. {pyft8-2.7.3 → pyft8-2.7.5}/PyFT8.egg-info/PKG-INFO +1 -1
  6. {pyft8-2.7.3 → pyft8-2.7.5}/pyproject.toml +1 -1
  7. {pyft8-2.7.3 → pyft8-2.7.5}/LICENSE +0 -0
  8. {pyft8-2.7.3 → pyft8-2.7.5}/MANIFEST.in +0 -0
  9. {pyft8-2.7.3 → pyft8-2.7.5}/PyFT8/__init__.py +0 -0
  10. {pyft8-2.7.3 → pyft8-2.7.5}/PyFT8/callhashes.py +0 -0
  11. {pyft8-2.7.3 → pyft8-2.7.5}/PyFT8/hamlib.py +0 -0
  12. {pyft8-2.7.3 → pyft8-2.7.5}/PyFT8/maidenhead.py +0 -0
  13. {pyft8-2.7.3 → pyft8-2.7.5}/PyFT8/pskr_upload.py +0 -0
  14. {pyft8-2.7.3 → pyft8-2.7.5}/PyFT8/receiver.py +0 -0
  15. {pyft8-2.7.3 → pyft8-2.7.5}/PyFT8/rigctrl.py +0 -0
  16. {pyft8-2.7.3 → pyft8-2.7.5}/PyFT8/time_utils.py +0 -0
  17. {pyft8-2.7.3 → pyft8-2.7.5}/PyFT8/transmitter.py +0 -0
  18. {pyft8-2.7.3 → pyft8-2.7.5}/PyFT8.egg-info/SOURCES.txt +0 -0
  19. {pyft8-2.7.3 → pyft8-2.7.5}/PyFT8.egg-info/dependency_links.txt +0 -0
  20. {pyft8-2.7.3 → pyft8-2.7.5}/PyFT8.egg-info/entry_points.txt +0 -0
  21. {pyft8-2.7.3 → pyft8-2.7.5}/PyFT8.egg-info/requires.txt +0 -0
  22. {pyft8-2.7.3 → pyft8-2.7.5}/PyFT8.egg-info/top_level.txt +0 -0
  23. {pyft8-2.7.3 → pyft8-2.7.5}/README.md +0 -0
  24. {pyft8-2.7.3 → pyft8-2.7.5}/setup.cfg +0 -0
  25. {pyft8-2.7.3 → pyft8-2.7.5}/tests/dev/CQ AAAA.py +0 -0
  26. {pyft8-2.7.3 → pyft8-2.7.5}/tests/dev/osd.py +0 -0
  27. {pyft8-2.7.3 → pyft8-2.7.5}/tests/dev/test_generate_wav.py +0 -0
  28. {pyft8-2.7.3 → pyft8-2.7.5}/tests/dev/test_loopback_performance.py +0 -0
  29. {pyft8-2.7.3 → pyft8-2.7.5}/tests/dev/view_worked_before.py +0 -0
  30. {pyft8-2.7.3 → pyft8-2.7.5}/tests/plot_baseline.py +0 -0
  31. {pyft8-2.7.3 → pyft8-2.7.5}/tests/spare.py +0 -0
  32. {pyft8-2.7.3 → pyft8-2.7.5}/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.7.3
3
+ Version: 2.7.5
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
@@ -165,7 +165,7 @@ class Gui:
165
165
  self.band_stats = Scrollbox(self.fig, [L['pmargin'], wf_top+L['vsep1'], L['sidebar_width'], L['banner_height']], nlines = 4, monospace = True)
166
166
  self.band_stats.ax.text(-0.2,0.75,'Tx')
167
167
  self.band_stats.ax.text(-0.2,0.25,'Rx')
168
- self.band_stats.ax.set_title(f"Spots to/from {config['station']['grid'][:4]}", fontsize = 10)
168
+ self.band_stats.ax.set_title(f"Spots to/from {config['station']['grid'][:4]} <15 mins", fontsize = 10)
169
169
 
170
170
  # console
171
171
  self.console = Scrollbox(self.fig, [wf_left, wf_top+L['vsep1'], 1-wf_left-L['pmargin'], L['banner_height']])
@@ -41,6 +41,8 @@ class PSKR_MQTT_listener:
41
41
  self.my_call = my_call
42
42
  self.hearing_me = DiskDict(f"{config_folder}/hearing_me.pkl")
43
43
  self.heard_by_me = DiskDict(f"{config_folder}/heard_by_me.pkl")
44
+ self.hearing_me_new = []
45
+ self.heard_by_me_new = []
44
46
  self.home_square = home_square
45
47
  self.callsign_cache = DiskDict(f"{config_folder}/callsign_cache.pkl")
46
48
  self.band_TxRx_homecall_report_times = DiskDict(f"{config_folder}/report_times.pkl")
@@ -70,32 +72,28 @@ class PSKR_MQTT_listener:
70
72
  d = literal_eval(msg.payload.decode())
71
73
  except:
72
74
  return
75
+ self.add_spot(d)
76
+
77
+ def add_spot(self, d):
73
78
  sc, rc = (d['sc'], d['sl']), (d['rc'], d['rl'])
74
79
  for iTxRx, c in enumerate([sc, rc]):
75
80
  call, loc = c
76
81
  self.callsign_cache.data[call] = loc
82
+ tnow = time.time()
77
83
  if self.home_square in loc:
78
84
  key = (d['b'], iTxRx, call)
79
85
  self.band_TxRx_homecall_report_times.data.setdefault(key, [])
80
- self.band_TxRx_homecall_report_times.data[key].append(time.time())
86
+ self.band_TxRx_homecall_report_times.data[key].append(tnow)
81
87
  if d['sc'] == self.my_call:
82
88
  self.hearing_me.data.setdefault(d['b'], {})
83
- new = (d['rc'] not in self.hearing_me.data)
84
- new_on_band = (d['rc'] not in self.hearing_me.data[d['b']])
85
- self.hearing_me.data[d['b']][d['rc']] = {'t': time.time(),'rp': d['rp'],'c': d['rc'], 'new':''}
86
- if new_on_band:
87
- self.hearing_me.data[d['b']][d['rc']].update({'new':'new_on_band'})
88
- if new:
89
- self.hearing_me.data[d['b']][d['rc']].update({'new':'new'})
89
+ if d['rc'] not in self.hearing_me.data[d['b']]:
90
+ self.hearing_me_new.append(d['rc'])
91
+ self.hearing_me.data[d['b']][d['rc']] = {'t': tnow,'rp': d['rp'],'c': d['rc']}
90
92
  if d['rc'] == self.my_call:
91
93
  self.heard_by_me.data.setdefault(d['b'], {})
92
- new = (d['sc'] not in self.heard_by_me.data)
93
- new_on_band = (d['sc'] not in self.heard_by_me.data[d['b']])
94
- self.heard_by_me.data[d['b']][d['sc']] = {'t': time.time(),'rp': d['rp'],'c': d['sc'], 'new':''}
95
- if new_on_band:
96
- self.heard_by_me.data[d['b']][d['sc']].update({'new':'new_on_band'})
97
- if new:
98
- self.heard_by_me.data[d['b']][d['sc']].update({'new':'new'})
94
+ if d['sc'] not in self.heard_by_me.data[d['b']]:
95
+ self.heard_by_me_new.append(d['sc'])
96
+ self.heard_by_me.data[d['b']][d['sc']] = {'t': tnow,'rp': d['rp'],'c': d['sc']}
99
97
 
100
98
  def count_activity(self):
101
99
  import numpy as np
@@ -14,7 +14,7 @@ from PyFT8.hamlib import Rig_hamlib
14
14
  from PyFT8.mqtt import PSKR_MQTT_listener
15
15
  import PyFT8.maidenhead as maidenhead
16
16
 
17
- VER = '2.7.3'
17
+ VER = '2.7.5'
18
18
 
19
19
  MAX_TX_START_SECONDS = 2.5
20
20
  SPOTLIFE = 5*60
@@ -257,9 +257,11 @@ def on_rx_decode(c):
257
257
  if gui:
258
258
  gui.add_message_box(message)
259
259
  if qso.band_info['b'] is not None and pskr_upload is not None:
260
- dx_call = c.msg_tuple[1]
260
+ _, dx_call, dx_grid = c.msg_tuple
261
261
  if dx_call != 'not' and dx_call != config['station']['call']:
262
262
  pskr_upload.add_report(dx_call, int(1000000*float(qso.band_info['fMHz'])) + c.fHz, c.snr, 'FT8', 1, int(time.time()))
263
+ loc = pskr_info.callsign_cache.data.get(dx_call, dx_grid)
264
+ pskr_info.add_spot({'sc':dx_call, 'sl':loc, 'rc':config['station']['call'], 'rl':config['station']['grid'], 'b':qso.band_info['b'], 'rp': c.snr})
263
265
  print(message.wsjtx_screen_format())
264
266
  write_all_txt_row(message)
265
267
 
@@ -274,7 +276,7 @@ def on_rx_busy_profile(busy_profile_new, cycle):
274
276
  idx = np.argmin(busy_profile[f0_idx:fn_idx])
275
277
  clearest_frequency = (f0_idx + idx) * audio_in.df
276
278
  busy_profile = busy_profile_new
277
- console_print(f"[on_busy] Set Tx freq to {clearest_frequency:6.1f}")
279
+ console_print(f"[on_busy] Clear Tx frequency found at {clearest_frequency:6.1f}")
278
280
 
279
281
  #============= Callbacks for GUI ==========================================================
280
282
  def on_gui_sidebars_refresh(gui):
@@ -309,14 +311,16 @@ def on_gui_sidebars_refresh(gui):
309
311
 
310
312
  #refresh hearing me / heard by me panel
311
313
  cycle = global_time_utils.curr_cycle_from_time()
312
- data = pskr_info.heard_by_me.data if cycle == 1 else pskr_info.hearing_me.data
313
- txts, cols = ['Hearing me' if cycle==1 else 'Heard by me'], ['white']
314
+ data = pskr_info.hearing_me.data if cycle == 1 else pskr_info.heard_by_me.data
315
+ new_calls = pskr_info.hearing_me_new if cycle == 1 else pskr_info.heard_by_me_new
316
+ txts, cols = [f"Hearing me <{SPOTLIFE/60:.0f} mins" if cycle==1 else f"Heard by me <{SPOTLIFE/60:.0f} mins"], ['white']
314
317
  if b is not None and b in data:
315
318
  hm = [h for h in data[b].values() if (time.time() - h['t']) < SPOTLIFE]
316
319
  for h in hm:
317
320
  geo_text = geo_text = get_geo_text(h['c'])
318
321
  txts.append(f"{h['c']:<7} {int(h['rp']):+03d} {geo_text:<12}")
319
- cols.append('lime' if h['new'] == 'new' else ('white' if h['new'] == 'new_on_band' else 'lightgrey'))
322
+ col = 'white' if h['c'] in new_calls else 'lime'
323
+ cols.append(col)
320
324
  gui.hm.list_print(txts, cols)
321
325
 
322
326
  def on_gui_control_click(btn_def):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PyFT8
3
- Version: 2.7.3
3
+ Version: 2.7.5
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
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "PyFT8"
3
- version = "2.7.3"
3
+ version = "2.7.5"
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
File without changes
File without changes
File without changes