diff --git a/freedata_gui/src/components/grid/grid_active_heard_stations.vue b/freedata_gui/src/components/grid/grid_active_heard_stations.vue index cb818957..8c887f6d 100644 --- a/freedata_gui/src/components/grid/grid_active_heard_stations.vue +++ b/freedata_gui/src/components/grid/grid_active_heard_stations.vue @@ -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)" > @@ -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)" > diff --git a/freedata_gui/src/locales/en_English.json b/freedata_gui/src/locales/en_English.json index 4069dc05..50b4ce0f 100644 --- a/freedata_gui/src/locales/en_English.json +++ b/freedata_gui/src/locales/en_English.json @@ -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", diff --git a/freedata_server/message_system_db_messages.py b/freedata_server/message_system_db_messages.py index 93420a95..c0f7d904 100644 --- a/freedata_server/message_system_db_messages.py +++ b/freedata_server/message_system_db_messages.py @@ -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 = [ diff --git a/freedata_server/schedule_manager.py b/freedata_server/schedule_manager.py index 4a3ecdf7..aa8012fe 100644 --- a/freedata_server/schedule_manager.py +++ b/freedata_server/schedule_manager.py @@ -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()