mirror of
https://github.com/Colorado-Mesh/meshcore-bot-firmware.git
synced 2026-08-11 16:20:29 +00:00
Bundles in-progress utility commands (TIME, LORA, ID, NEIGHBORS), neighbor tracking, received_at_timestamp / personalized acks, and per-hop response delay coordination. Tunes the coordinator so multi-hop senders actually get responses: hop step 5s→1.5s, hop bias capped at 8s, pending TTL 15s→45s. Verified on Heltec V3 bench bot: responds to #bot at 2, 4, and 6 hops. BOT_PREFS_VERSION bumped 2→3, so existing bots will reset bot prefs (channel names, known bots) to defaults on first boot of this firmware.
41 lines
1.1 KiB
Python
41 lines
1.1 KiB
Python
#!/usr/bin/env python3
|
|
import os
|
|
import subprocess
|
|
from pathlib import Path
|
|
|
|
ROOT = Path(__file__).resolve().parents[2]
|
|
BUILD_DIR = ROOT / "out" / "tests" / "firmware_bot"
|
|
SRC_DIR = ROOT / "vendor" / "MeshCore" / "examples" / "companion_radio"
|
|
|
|
|
|
def main():
|
|
BUILD_DIR.mkdir(parents=True, exist_ok=True)
|
|
binary = BUILD_DIR / "test_firmware_bot"
|
|
command = [
|
|
os.environ.get("CXX", "c++"),
|
|
"-std=c++17",
|
|
"-Wall",
|
|
"-Wextra",
|
|
"-Werror",
|
|
"-DBOT_LOCAL_TIME_OFFSET_SECONDS=-21600",
|
|
"-I",
|
|
str(SRC_DIR),
|
|
str(ROOT / "tests" / "firmware_bot" / "test_firmware_bot.cpp"),
|
|
str(SRC_DIR / "FirmwareBot.cpp"),
|
|
str(SRC_DIR / "BotCommandRegistry.cpp"),
|
|
str(SRC_DIR / "BotPrefs.cpp"),
|
|
str(SRC_DIR / "BotPolicy.cpp"),
|
|
str(SRC_DIR / "BotCommands.cpp"),
|
|
str(SRC_DIR / "EmergencyForwarder.cpp"),
|
|
str(SRC_DIR / "KnownBotRegistry.cpp"),
|
|
str(SRC_DIR / "ResponseCoordinator.cpp"),
|
|
"-o",
|
|
str(binary),
|
|
]
|
|
subprocess.run(command, check=True)
|
|
subprocess.run([str(binary)], check=True)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|