MP: Logging, test js parameters (broken)

This commit is contained in:
Sebastian Lohff 2025-04-13 18:09:00 +02:00
parent fb500705ef
commit 0e6ab98c6f
3 changed files with 17 additions and 1 deletions

View File

@ -20,6 +20,7 @@ config/icon="res://icon.svg"
[autoload] [autoload]
MorseState="*res://autoloads/morse_state.gd" MorseState="*res://autoloads/morse_state.gd"
Utils="*res://autoloads/utils.gd"
[display] [display]

View File

@ -29,6 +29,14 @@ func _ready():
if multiplayer_enabled: if multiplayer_enabled:
%MultiplayerButton.visible = true %MultiplayerButton.visible = true
print("External freq: ", Utils.get_external_freq_param())
if Utils.get_external_freq_param():
_on_multiplayer_button_pressed()
# FIXME: make this dependant on button
OS.open_midi_inputs() OS.open_midi_inputs()
print(OS.get_connected_midi_inputs()) print(OS.get_connected_midi_inputs())

View File

@ -1,11 +1,18 @@
import asyncio import asyncio
import datetime
import json import json
import logging
import re import re
from websockets.asyncio.server import serve from websockets.asyncio.server import serve
__VERSION__ = "0.0.1" __VERSION__ = "0.0.1"
logging.basicConfig(
level=logging.INFO,
format="%(asctime)s %(name)s %(levelname)s %(message)s"
)
class Client: class Client:
freqs = {} freqs = {}
@ -53,7 +60,7 @@ class Client:
await self._send_error("Invalid format in json") await self._send_error("Invalid format in json")
continue continue
print(f"{self.client} wrote:", data) print(f"{datetime.datetime.now()} {self.client} wrote:", data)
match data["cmd"]: match data["cmd"]:
case "quit": case "quit":