Skip to content

Commit

Permalink
Added LOGGER with tkinter; Fixed MAIN/SUB switch behavior and colors;…
Browse files Browse the repository at this point in the history
… small UI enhancements; lowered CW PITCh to 500Hz
  • Loading branch information
mcogoni committed Feb 18, 2022
1 parent 2fc69b1 commit 79c4371
Show file tree
Hide file tree
Showing 2 changed files with 259 additions and 31 deletions.
25 changes: 23 additions & 2 deletions supersdr.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@
disp.splash_screen(sdrdisplay)
font = pygame.font.Font(None, 50)


#################################
FPS = options['refresh']
fl.dualrx_flag = options['dualrx']

Expand All @@ -69,6 +71,9 @@
dxclust = None
eibi = eibi_db()

mylogger = logger(CALLSIGN)
mylogger.read_file()

palRGB = disp.create_cm(options["colormap"])

kiwi_host = options['kiwiserver']
Expand Down Expand Up @@ -264,6 +269,14 @@
show_bigmsg = "forcesync"
run_index_bigmsg = run_index

# Show logger popup
if keys[pygame.K_0]:
mylogger.log_popup(kiwi_snd)

# Show logger popup
if keys[pygame.K_9]:
mylogger.search_popup(kiwi_snd)

# Show EIBI labels
if keys[pygame.K_i]:
fl.show_eibi_flag = False if fl.show_eibi_flag else True
Expand Down Expand Up @@ -469,11 +482,11 @@
if fast_tune:
manual_snd_freq = kiwi_snd.freq//1 - 10
elif slow_tune:
manual_snd_freq = kiwi_snd.freq - 0.1
manual_snd_freq = round(kiwi_snd.freq - 0.1, 2)
else:
manual_snd_freq = kiwi_snd.freq//1 if kiwi_snd.freq % 1 else kiwi_snd.freq//1 - 1
else: # CW
manual_snd_freq = kiwi_snd.freq - (1.0 if fast_tune else (0.01 if slow_tune else 0.1))
manual_snd_freq = round(kiwi_snd.freq - (1.0 if fast_tune else (0.01 if slow_tune else 0.1)), 2)
elif keys[pygame.K_RIGHT]:
if not ((mods & pygame.KMOD_SHIFT) and (mods & pygame.KMOD_CTRL)):
fast_tune = True if mods & pygame.KMOD_SHIFT else False
Expand Down Expand Up @@ -960,6 +973,9 @@
elif fl.input_callsign_flag:
question = "DXCLuster CALLSIGN"
disp.display_box(sdrdisplay, question + ": " + "".join(current_string), 300)
elif fl.input_qso_flag:
question = "CALL"
disp.display_box(sdrdisplay, question + ": " + "".join(current_string), 300)
elif fl.input_server_flag:
disp.display_kiwi_box(sdrdisplay, current_string, kiwilist)
elif fl.show_help_flag:
Expand Down Expand Up @@ -1035,6 +1051,11 @@
if cat_radio and not cat_radio.cat_ok:
cat_radio = None

try:
mylogger.main_dialog.update()
except:
pass

# close audio stream
kiwi_audio_stream.stop()

Expand Down
Loading

0 comments on commit 79c4371

Please sign in to comment.