From a05cacad5239ab3f35ffb58f443356b484e6cc1b Mon Sep 17 00:00:00 2001
From: jinlicong <493886250@qq.com>
Date: Tue, 21 May 2024 19:17:22 +0800
Subject: [PATCH] 继续完善远传
---
Soft/linked_list.c | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/Soft/linked_list.c b/Soft/linked_list.c
index 7087ca4..5dd93b2 100644
--- a/Soft/linked_list.c
+++ b/Soft/linked_list.c
@@ -30,6 +30,8 @@
//˫��ָ�룺ָ��ָ���ָ�룬�����ı�ָ���ַ��ֵ�������˫��ָ��
void Alarm_List_Node_PushBack(ALARM_NODE_T ** ppList,SYS_ALARM_VALVE_T alarm_id)
{
+ ALARM_NODE_T * tail, * now_ptr;
+
if(alarm_id != ALARM_ID_NORMAL)
{
alarm_list_cnt++;
@@ -39,7 +41,17 @@
}
else
{
- ALARM_NODE_T * tail = *ppList;
+ //�ж��������Ƿ��Ѿ����ڸñ���id���Ѿ����ڲ��ٲ�������
+ do{
+ if(now_ptr->list_data == alarm_id){
+ return;
+ }else{
+ now_ptr = now_ptr->alarm_list_next;
+ }
+
+ }while(now_ptr != NULL);
+
+ tail = *ppList;
while(tail->alarm_list_next)
tail = tail->alarm_list_next;
tail->alarm_list_next = Alarm_List_Node_Add(alarm_id);
--
Gitblit v1.9.3