feat!: orac on donglora 1.0 async Dongle API
Upgrade the MeshCore bot to talk the DongLoRa Protocol v2 via donglora 1.0.0. * BotRuntime now holds a donglora.Dongle instead of a raw serial conn. All transmit / receive / ADVERT plumbing goes through the async Dongle surface. * Drop the direct pyserial imports; SerialException handling is now dongle-level (reconnect is handled by donglora.connect()). * Update constants and dispatch to match the Dongle accessors (info, set_config, transmit, start_rx) exposed by the 1.0 client.
This commit is contained in:
4 files changed
+75
-68
No files matched your search
+4
-4
@@ -7,8 +7,8 @@ import random
|
||||
import threading
|
||||
import time
|
||||
from collections.abc import Callable
|
||||
from typing import Any
|
||||
|
||||
import donglora as dl
|
||||
from orac import events, followup, logfmt
|
||||
from orac.ai import extract_trigger_query, rate_limit_message
|
||||
from orac.constants import (
|
||||
@@ -122,9 +122,9 @@ class RxRouter:
|
||||
|
||||
# -- top-level dispatch ---------------------------------------
|
||||
|
||||
def handle(self, pkt: dict[str, Any]) -> None:
|
||||
payload_bytes: bytes = pkt.get("payload", b"")
|
||||
snr: float = float(pkt.get("snr", 0))
|
||||
def handle(self, pkt: dl.RxEvent) -> None:
|
||||
payload_bytes = pkt.data
|
||||
snr = pkt.snr_db
|
||||
|
||||
parsed = parse_header_and_path(payload_bytes)
|
||||
if parsed is None:
|
||||
|
||||
Reference in new issue
Block a user