mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
removed beacon interval change, send beacon when enabling it
This commit is contained in:
parent
6b693c6759
commit
0e07697a98
|
@ -193,26 +193,6 @@ const audioStore = useAudioStore();
|
||||||
<option value="250">250</option>
|
<option value="250">250</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-group input-group-sm mb-1">
|
|
||||||
<span class="input-group-text w-50">Beacon interval</span>
|
|
||||||
<select
|
|
||||||
class="form-select form-select-sm"
|
|
||||||
aria-label=".form-select-sm"
|
|
||||||
id="beaconInterval"
|
|
||||||
style="width: 6rem"
|
|
||||||
@change="onChange"
|
|
||||||
v-model.number="settings.remote.MODEM.beacon_interval"
|
|
||||||
>
|
|
||||||
<option value="60">60 secs</option>
|
|
||||||
<option value="90">90 secs</option>
|
|
||||||
<option value="120">2 mins</option>
|
|
||||||
<option selected value="300">5 mins</option>
|
|
||||||
<option value="600">10 mins</option>
|
|
||||||
<option value="900">15 mins</option>
|
|
||||||
<option value="1800">30 mins</option>
|
|
||||||
<option value="3600">60 mins</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="input-group input-group-sm mb-1">
|
<div class="input-group input-group-sm mb-1">
|
||||||
<label class="input-group-text w-50">Enable 250Hz bandwidth mode</label>
|
<label class="input-group-text w-50">Enable 250Hz bandwidth mode</label>
|
||||||
|
|
|
@ -61,7 +61,6 @@ const defaultConfig = {
|
||||||
tuning_range_fmax: 0,
|
tuning_range_fmax: 0,
|
||||||
tuning_range_fmin: 0,
|
tuning_range_fmin: 0,
|
||||||
tx_delay: 0,
|
tx_delay: 0,
|
||||||
beacon_interval: 0,
|
|
||||||
enable_hamc: false,
|
enable_hamc: false,
|
||||||
enable_morse_identifier: false,
|
enable_morse_identifier: false,
|
||||||
},
|
},
|
||||||
|
|
|
@ -54,7 +54,6 @@ enable_morse_identifier = False
|
||||||
respond_to_cq = True
|
respond_to_cq = True
|
||||||
rx_buffer_size = 64
|
rx_buffer_size = 64
|
||||||
tx_delay = 200
|
tx_delay = 200
|
||||||
beacon_interval = 300
|
|
||||||
|
|
||||||
[MESSAGES]
|
[MESSAGES]
|
||||||
enable_auto_repeat = False
|
enable_auto_repeat = False
|
||||||
|
|
|
@ -64,8 +64,7 @@ class CONFIG:
|
||||||
'enable_low_bandwidth_mode': bool,
|
'enable_low_bandwidth_mode': bool,
|
||||||
'respond_to_cq': bool,
|
'respond_to_cq': bool,
|
||||||
'rx_buffer_size': int,
|
'rx_buffer_size': int,
|
||||||
'tx_delay': int,
|
'tx_delay': int
|
||||||
'beacon_interval': int,
|
|
||||||
},
|
},
|
||||||
'MESSAGES': {
|
'MESSAGES': {
|
||||||
'enable_auto_repeat': bool,
|
'enable_auto_repeat': bool,
|
||||||
|
|
|
@ -16,13 +16,12 @@ class ScheduleManager:
|
||||||
self.state_manager = state_manger
|
self.state_manager = state_manger
|
||||||
self.event_manager = event_manager
|
self.event_manager = event_manager
|
||||||
self.config = self.config_manager.read()
|
self.config = self.config_manager.read()
|
||||||
self.beacon_interval = self.config['MODEM']['beacon_interval']
|
|
||||||
|
|
||||||
self.scheduler = sched.scheduler(time.time, time.sleep)
|
self.scheduler = sched.scheduler(time.time, time.sleep)
|
||||||
self.events = {
|
self.events = {
|
||||||
'check_for_queued_messages': {'function': self.check_for_queued_messages, 'interval': 10},
|
'check_for_queued_messages': {'function': self.check_for_queued_messages, 'interval': 10},
|
||||||
'explorer_publishing': {'function': self.push_to_explorer, 'interval': 60},
|
'explorer_publishing': {'function': self.push_to_explorer, 'interval': 60},
|
||||||
'transmitting_beacon': {'function': self.transmit_beacon, 'interval': self.beacon_interval},
|
'transmitting_beacon': {'function': self.transmit_beacon, 'interval': 600},
|
||||||
'beacon_cleanup': {'function': self.delete_beacons, 'interval': 600},
|
'beacon_cleanup': {'function': self.delete_beacons, 'interval': 600},
|
||||||
}
|
}
|
||||||
self.running = False # Flag to control the running state
|
self.running = False # Flag to control the running state
|
||||||
|
|
|
@ -13,6 +13,7 @@ import json
|
||||||
import websocket_manager as wsm
|
import websocket_manager as wsm
|
||||||
import api_validations as validations
|
import api_validations as validations
|
||||||
import command_cq
|
import command_cq
|
||||||
|
import command_beacon
|
||||||
import command_ping
|
import command_ping
|
||||||
import command_feq
|
import command_feq
|
||||||
import command_test
|
import command_test
|
||||||
|
@ -150,6 +151,8 @@ def post_beacon():
|
||||||
|
|
||||||
if not app.state_manager.is_beacon_running:
|
if not app.state_manager.is_beacon_running:
|
||||||
app.state_manager.set('is_beacon_running', request.json['enabled'])
|
app.state_manager.set('is_beacon_running', request.json['enabled'])
|
||||||
|
if not app.state_manager.getARQ():
|
||||||
|
enqueue_tx_command(command_beacon.BeaconCommand, request.json)
|
||||||
else:
|
else:
|
||||||
app.state_manager.set('is_beacon_running', request.json['enabled'])
|
app.state_manager.set('is_beacon_running', request.json['enabled'])
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue