attempt using ptt

This commit is contained in:
DJ2LS 2023-11-09 18:00:12 +01:00
parent 304b35da1f
commit 3b9db2980c
2 changed files with 11 additions and 5 deletions

View file

@ -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)

View file

@ -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