feat(gml670-v2): 添加传感器采集线程与主入口

- sensor: 独立 Zephyr 线程,4 通道×17 次均值采集→CoP→BLE 发送,
  原子去皮请求,5Hz 调试日志
- main: 薄编排层,仅初始化 BLE 和传感器模块

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-30 17:37:38 +08:00
parent 1ad7a9d4ad
commit 1e8809cf89
3 changed files with 248 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
/*
* GML670 Balance Board — CoP Binary Protocol
* Features:
* - 4-channel ADS1256 with averaging filter.
* - Board-side CoP (Center of Pressure) computation.
* - Binary protocol over BLE NUS (17-byte CoP frame, 50 Hz).
* - Downlink: resistance params, spotter mode, heartbeat.
*/
#include "ble_transport.h"
#include "sensor.h"
#include <zephyr/kernel.h>
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(main, LOG_LEVEL_INF);
int main(void) {
k_msleep(2000);
LOG_INF("--- GML670 System (CoP Binary Protocol) ---");
ble_transport_init();
ble_transport_adv_start();
if (sensor_init()) return 0;
return 0;
}