Skip to content

Commit

Permalink
Merge pull request #205 from mbridak/fix_ssb_when_crossing_10m
Browse files Browse the repository at this point in the history
Fix ssb modes send to radio when crossing between the 10M boundary.
  • Loading branch information
mbridak authored Oct 27, 2024
2 parents f5e5d71 + e36b8e2 commit fe26f5a
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Changelog

- [24-10-27-1] Fixed setting radios ssb mode when crossing 10M boundary.
- [24-10-27] Fix bug where a contacts info could be carried over to new contact if no new value was written.
- [24-10-26] Clear inputs when seeking to a call from the bandmap via the arrow up and down. Fixed bandmap crash from bad telnet data. Drop beacons from bandmap.
- [24-10-25] Add File Menu option to create either an ASCII or UTF8 Cabrillo.
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ generated, 'cause I'm lazy, list of those who've submitted PR's.

## Recent Changes (Polishing the Turd)

- [24-10-27-1] Fixed setting radios ssb mode when crossing 10M boundary.
- [24-10-27] Fix bug where a contacts info could be carried over to new contact if no new value was written.
- [24-10-26] Clear inputs when seeking to a call from the bandmap via the arrow up and down. Fixed bandmap crash from bad telnet data. Drop beacons from bandmap.
- [24-10-25] Add File Menu option to create either an ASCII or UTF8 Cabrillo.
Expand Down
20 changes: 14 additions & 6 deletions not1mm/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1041,7 +1041,9 @@ def change_to_band_and_mode(self, band: int, mode: str) -> None:
if mode in ["CW", "SSB", "RTTY"]:
freq = fakefreq(str(band), mode)
self.change_freq(freq)
self.change_mode(mode)
vfo = float(freq)
vfo = int(vfo * 1000)
self.change_mode(mode, intended_freq=vfo)

def quit_app(self) -> None:
"""
Expand Down Expand Up @@ -3125,12 +3127,12 @@ def callsign_changed(self) -> None:

def change_freq(self, stripped_text: str) -> None:
"""
Change VFO to given frequency in Khz and set the band indicator.
Send the new frequency to the rig control.
Change Radios VFO to given frequency in Khz.
Parameters
----------
stripped_text : str
stripped_text: str
Stripped of any spaces.
Returns
Expand Down Expand Up @@ -3160,7 +3162,7 @@ def change_freq(self, stripped_text: str) -> None:
if self.bandmap_window:
self.bandmap_window.msg_from_main(cmd)

def change_mode(self, mode: str) -> None:
def change_mode(self, mode: str, intended_freq=None) -> None:
"""
Change mode to given mode.
Send the new mode to the rig control.
Expand Down Expand Up @@ -3208,10 +3210,16 @@ def change_mode(self, mode: str) -> None:
self.read_cw_macros()
return
if mode == "SSB":
if int(self.radio_state.get("vfoa", 0)) > 10000000:
if intended_freq:
freq = intended_freq
else:
freq = int(self.radio_state.get("vfoa", 0))

if freq > 10000000:
self.radio_state["mode"] = "USB"
else:
self.radio_state["mode"] = "LSB"

if self.rig_control and self.rig_control.online:
self.rig_control.set_mode(self.radio_state.get("mode"))
else:
Expand Down
2 changes: 1 addition & 1 deletion not1mm/lib/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""It's the version"""

__version__ = "24.10.27"
__version__ = "24.10.27.1"
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "not1mm"
version = "24.10.27"
version = "24.10.27.1"
description = "NOT1MM Logger"
readme = "README.md"
requires-python = ">=3.9"
Expand Down

0 comments on commit fe26f5a

Please sign in to comment.