Files
Horldsence a30eb3200a armor: ESP32-C3 装甲板固件(一主三从)+ 烧录脚本,之前一直没提交
这一块代码本来就写好了、根 README 里也按"已实现"描述,但一直没有进仓库,
只存在于工作区里。同一个提交里带上 `.env.example` 的两个新变量(ARMOR_TEAM、
ARMOR_THRESHOLD)——它们的说明文字就是为这套固件写的。

内容:
- armor-protocol:规则层(血量、每板独立 50ms 受击冷却、受击后只有那一路灯带全黑、
  按键 FSM、上报编码)。纯计算,主机上 22 个测试,已跑通。
- armor-firmware:四路压电片 ADC 连续采样、四路 WS2812(C3 只有一个 RMT 通道可用,
  靠 rmt_tx_switch_gpio 轮流驱动)、NVS、BOOT 键、WiFi + UDP 广播。
- scripts:build_armor.sh / flash_armor.sh / armor_probe.py(不开界面单看广播)。

armor/ 是独立 workspace(目标 RISC-V 的 ESP32-C3),与外层 Xtensa 的图传固件互不相干,
各自 .cargo/config.toml 就是这条边界。构建产物由根 .gitignore 的 `/armor/target/` 覆盖,
本次没有把任何 target/ 或 build/ 下的东西加进来。

顺带把 `.DS_Store` 加进 .gitignore。
2026-10-14 19:43:14 +08:00

31 lines
1.2 KiB
Bash

# Copy to .env and fill in. Never commit .env - it holds the WiFi password.
# Required
WIFI_SSID=your-ssid
WIFI_PASS=your-password
# Optional
# Armor plates (armor/). Which team this board belongs to: 0 = team one (red),
# 1 = team two (blue). Decides the LED colour and the `team` field in the health
# reports, so it is baked in at build time - reflash to switch teams.
#ARMOR_TEAM=0
# Armor plates: raw 12-bit ADC level above which a piezo sample counts as a hit
# (default 2000, same as the reference firmware). Calibrate from the `peak[...]`
# field in the serial status line: idle noise well below, a real tap well above.
#ARMOR_THRESHOLD=2000
# Capture resolution: qqvga | qvga | cif | hvga | vga | svga | xga | sxga | uxga
#CAM_RES=vga
# JPEG quality 0-63, lower is better quality
#CAM_QUALITY=12
# Set to 0 if your board inverts VSYNC in hardware.
#CAM_VSYNC_INVERT=1
# Pin the authentication mode instead of trusting the scan: none | wep | wpa |
# wpa2 | wpawpa2 | wpa3 | wpa2wpa3 | wapi. Only needed when the scan cannot see
# the AP (a hidden SSID, for instance) - otherwise the scan reports the real
# mode and this only makes it fail faster.
#WIFI_AUTH=wpa2