背景: V4.24 黄灯只在60s进入学习后才亮, 前60s操作员无可视反馈 改动: poll_yellow_led 模式4条件放宽 = g_env_resync || g_env_wait_cnt>=ENV_WARN_WAIT - ENV_WARN_WAIT=500tick(~5s) 放 TaskLoop.h 文件级(poll_yellow_led 可见) - dev>+4dlt 高位连续5s未回摆 → 黄灯预判常亮; 累计60s才真正学习(黄灯保持) - 预判≠学习: 回摆/目标靠近(wait清零) → 黄灯即灭, 不触发学习 tests/test_env_resync.c 扩展: 预判点亮时刻=500tick / 瞬态4000tick预判亮但不学 / 打断回摆后预判灭; 5场景ALL PASS + 语法0 error docs: devlog V2.23 + spec V2.4(ENV_WARN_WAIT行) + 产品手册 V2.8 同步
73 lines
1.7 KiB
C
73 lines
1.7 KiB
C
/**
|
|
**************************************************************************
|
|
* @file cmcng.h
|
|
* @version v1.0
|
|
* @date 2025-09-08
|
|
* @brief һЩÅäÖÃ
|
|
**************************************************************************
|
|
* Copyright notice & Disclaimer
|
|
* * Create 2025-09-08 by wangfq
|
|
* *
|
|
**************************************************************************
|
|
*/
|
|
#ifndef __CMCNG_H__
|
|
#define __CMCNG_H__
|
|
|
|
#define PRODUCT_MODEL "DLD154"
|
|
#define FIRMWARE_VER "4.25"
|
|
#define HARDWARE_VER "3.00"
|
|
#define FIRMWARE_VER_MAIN 4
|
|
#define FIRMWARE_VER_SUB 25
|
|
#define HARDWARE_VER_MAIN 3
|
|
#define HARDWARE_VER_SUB 0
|
|
|
|
|
|
#include <stdio.h>
|
|
#include <stdint.h>
|
|
|
|
|
|
#ifdef DEBUG
|
|
#define PRINT(X...) printf(X)
|
|
#else
|
|
#define PRINT(X...)
|
|
#endif
|
|
|
|
|
|
|
|
typedef struct _LOOP_ACS_INFO
|
|
{
|
|
uint8_t flag_event;
|
|
uint8_t loop_num;
|
|
uint8_t freq_level;
|
|
uint8_t sensity;
|
|
uint8_t relay1_cng;
|
|
uint8_t relay1_state;
|
|
uint8_t relay2_cng;
|
|
uint8_t relay2_state;
|
|
uint8_t loop_state;
|
|
uint8_t output_mode;
|
|
uint8_t dir_mode;
|
|
uint8_t delay;
|
|
uint8_t car_state;
|
|
uint8_t direction;
|
|
uint8_t flag_loop_safe;
|
|
uint32_t loop_safe_counter;
|
|
uint8_t condition;
|
|
uint32_t frequent;
|
|
uint32_t loop_capvd;
|
|
int16_t variation;
|
|
uint32_t event_counter;
|
|
uint32_t report_counter;
|
|
} Loop_ACS_Info;
|
|
extern Loop_ACS_Info g_loop_acs_info;
|
|
|
|
|
|
extern uint8_t g_flag_output;
|
|
extern uint8_t g_flag_output2;
|
|
|
|
extern uint8_t g_input_div;
|
|
|
|
|
|
|
|
#endif
|