mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
attempt using ptt
This commit is contained in:
parent
304b35da1f
commit
3b9db2980c
2 changed files with 11 additions and 5 deletions
|
@ -20,7 +20,15 @@ import { useSettingsStore } from "../store/settingsStore.js";
|
|||
const settings = useSettingsStore(pinia);
|
||||
|
||||
export function eventDispatcher(data) {
|
||||
console.log(data);
|
||||
data = JSON.parse(data);
|
||||
|
||||
// get ptt state as a first test
|
||||
// Todo we might use a switch function for data dispatching
|
||||
stateStore.ptt_state = data.ptt;
|
||||
|
||||
|
||||
|
||||
// copied directly from sock.js We need to implement these variables step by step
|
||||
if (data["command"] == "modem_state") {
|
||||
//console.log(data)
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ from queues import DATA_QUEUE_TRANSMIT
|
|||
import structlog
|
||||
log = structlog.get_logger("COMMANDS")
|
||||
|
||||
def cqcqcq(self):
|
||||
def cqcqcq():
|
||||
DATA_QUEUE_TRANSMIT.put(["CQ"])
|
||||
|
||||
def ping_ping(data):
|
||||
|
@ -18,9 +18,7 @@ def ping_ping(data):
|
|||
)
|
||||
|
||||
def beacon(data):
|
||||
beacon_state = False
|
||||
if data['enabled'] in ['True']:
|
||||
beacon_state = True
|
||||
beacon_state = data['enabled'] in ['True']
|
||||
#Beacon.beacon_state = beacon_state
|
||||
log.info(
|
||||
"[CMD] Changing beacon state", state=beacon_state
|
||||
|
|
Loading…
Reference in a new issue