fix:resident 字段修复(误伤了,重新放开)
feat:增加防抖功能。
This commit is contained in:
@@ -74,6 +74,7 @@ private:
|
||||
void _extractSleep(const RadarFrame& frame);
|
||||
void _extractWorkStatus(const RadarFrame& frame);
|
||||
void _extractDetectRange(const RadarFrame& frame);
|
||||
void _filterMotion(bool rawMotion); // 运动状态 3 帧去抖
|
||||
|
||||
uint8_t _calcChecksum(const uint8_t* data, uint16_t len);
|
||||
void _notifyUpdate();
|
||||
@@ -95,6 +96,10 @@ private:
|
||||
bool _stablePresence; // 防抖后的稳定有人/无人
|
||||
uint8_t _presenceCnt; // 连续一致计数
|
||||
bool _lastRawPresence; // 上一次原始值
|
||||
|
||||
// 运动状态防抖 (体动信号常因小动作抖动, 加 3 帧持续才确认)
|
||||
uint8_t _motionCnt; // 连续一致计数
|
||||
bool _lastRawMotion; // 上一次原始值
|
||||
};
|
||||
|
||||
#endif // RADAR_MANAGER_H
|
||||
|
||||
Reference in New Issue
Block a user