Merge pull request #919 from DJ2LS/ls-bughunting

fixing different smaller bugs
pull/921/head
DJ2LS 2025-03-18 11:17:12 +01:00 committed by GitHub
commit bbc66667ea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 16 additions and 10 deletions

View File

@ -136,7 +136,7 @@ function transmitPing(callsign) {
data-bs-toggle="modal"
type="button"
data-bs-trigger="hover"
data-bs-title="Start new chat"
data-bs-title="$t('grid.components.newmessage_help') "
@click="startNewChat(item.origin)"
>
<i class="bi bi-pencil-square"></i>
@ -148,7 +148,7 @@ function transmitPing(callsign) {
type="button"
data-bs-toggle="tooltip"
data-bs-trigger="hover"
data-bs-title="Transmit ping"
:data-bs-title="$t('grid.components.ping_help') "
@click="transmitPing(item.origin)"
>
<i class="bi bi-arrow-left-right"></i>

View File

@ -92,6 +92,7 @@
"onair": "on air",
"ping": "Ping",
"ping_help": "Send a ping request to a remote station",
"newmessage_help": "Send a new message to a remote station",
"heardstations": "Heard Stations",
"time": "Time",
"freq": "Freq",

View File

@ -234,9 +234,6 @@ class DatabaseManagerMessages(DatabaseManager):
status = message_dict.get("status", "")
statistics = message_dict.get("statistics", {})
print(message_dict)
print(statistics)
# Determine the CALL based on the direction
if direction == "receive":
call = origin.split("-")[0] # Take the part before the "-" if it exists
@ -273,15 +270,18 @@ class DatabaseManagerMessages(DatabaseManager):
else:
grid = ""
# Extract and adjust the frequency (Hz to MHz)
frequency_hz = statistics.get("frequency") # Get the frequency, may be None
if frequency_hz is not None:
frequency_mhz = round(frequency_hz / 1_000_000,
3) # Convert Hz to MHz and round to 3 decimal places
frequency_str = str(frequency_mhz) # Convert to string for ADIF format
try:
# Convert frequency_hz to float if it's a string
frequency_value = float(frequency_hz)
except ValueError:
frequency_value = 0.0
frequency_mhz = round(frequency_value / 1_000_000, 3) # Convert Hz to MHz
frequency_str = str(frequency_mhz)
else:
frequency_str = "14.000000" # Default to "0.000" MHz if frequency is missing
frequency_str = "14.000000" # Default if frequency is missing
# Construct the ADIF message
adif_fields = [

View File

@ -144,6 +144,11 @@ class ScheduleManager:
def push_to_explorer(self):
self.config = self.config_manager.read()
# check before if self.config has a loaded config dict
if not isinstance(self.config, dict):
return
if self.config['STATION']['enable_explorer'] and self.state_manager.is_modem_running:
try:
explorer.Explorer(self.modem_version, self.config_manager, self.state_manager).push()