Rdzleo 93f0e19d1d 初始化项目:精灵吊坠 RTC 语音助手 + VEML7700 石头同频匹配
ESP32-S3 吊坠设备固件,集成火山引擎 RTC 语音助手、蓝牙配网、
VEML7700 环境光传感器驱动及石头同频匹配交友功能。

VEML7700 驱动:
- 基于 ESP-IDF i2c_master API 实现,复用项目 I2cDevice 基类
- 支持 ALS + White 双通道、自动量程、Vishay 非线性校正
- 3 次采样取中位数过滤偶发异常

石头同频匹配算法(双维度):
- 维度1:光谱比值 ALS/White(石头固有光学特征,不随光照强度变化)
- 维度2:亮度等级(5级对数划分,排除极端环境差异)
- 比值阈值 15%,实测同石头姿势变化波动 1.6%~9.6%,安全余量充足

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 11:43:57 +08:00

52 lines
1.4 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#pragma once
#include "wifi_board.h"
#include "boards/common/qmi8658a.h"
namespace iot {
class ImuSensorThing;
}
class PowerSaveTimer;
class MovecallMojiESP32S3 : public WifiBoard {
public:
MovecallMojiESP32S3();
~MovecallMojiESP32S3();
// IMU传感器相关方法
bool IsImuInitialized() const;
bool GetImuData(qmi8658a_data_t* data);
void OnMotionDetected();
// 触摸相关方法
void LockTouchTask(int touch_pad_num);
void UnlockTouchTask();
void ResetAllTouchStates();
// 生产测试模式
void EnterProductionTestMode();
private:
// 私有成员变量和方法的声明
PowerSaveTimer* power_save_timer_;
static MovecallMojiESP32S3* instance_;
// IMU传感器相关
QMI8658A* imu_sensor_;
esp_timer_handle_t imu_timer_handle_;
qmi8658a_data_t latest_imu_data_;
bool imu_initialized_;
iot::ImuSensorThing* imu_thing_;
// 其他私有成员...
// (完整的私有成员列表在.cc文件中)
// 私有方法声明
void InitializeImuSensor();// 初始化IMU传感器QMI8658A 陀螺仪)
void InitializeIot();// 初始化IoT设备包括IMU传感器
void ProcessImuData(const qmi8658a_data_t* data);// 处理IMU数据的方法
// 静态回调函数
static void ImuTimerCallback(void* arg);// IMU传感器定时器回调函数
};