mirror of https://github.com/DJ2LS/FreeDATA.git
commit
bbc66667ea
|
@ -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>
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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 = [
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue