From 6b0d1f644233b2984d2a87553de598879cf05caf Mon Sep 17 00:00:00 2001
From: jinlicong <493886250@qq.com>
Date: Tue, 28 May 2024 17:24:59 +0800
Subject: [PATCH] 继续完善
---
Soft/system_run_fun.c | 17 ++++++++++++++++-
1 files changed, 16 insertions(+), 1 deletions(-)
diff --git a/Soft/system_run_fun.c b/Soft/system_run_fun.c
index f9eac63..9fdf00b 100644
--- a/Soft/system_run_fun.c
+++ b/Soft/system_run_fun.c
@@ -11,6 +11,7 @@
#include "power_manage.h"
#include "pulse_and_alarm_line.h"
#include "valve_control.h"
+#include "linked_list.h"
RS485_START_REASON start_rs485_g = RS485_START_REASON_NONE;
@@ -73,6 +74,8 @@
GPIO_EXTI_Init( LITH_PWR_LOSE_PORT, LITH_PWR_LOSE_PIN, EXTI_FALLING, ENABLE);
GPIO_EXTI_Init( ALKA_PWR_LOSE_PORT, ALKA_PWR_LOSE_PIN, EXTI_FALLING, ENABLE);
+
+ GPIO_EXTI_Init( LIMIT_TRIGGER_PORT, LIMIT_TRIGGER_PIN, EXTI_FALLING, ENABLE);
/*�������ж�����ѡ��,û���������ҿ���������*/
if(((flow_meter_para_g.broken_line_multiplex & BROKEN_LINE_MUTIPLEX_PULSE)!=BROKEN_LINE_MUTIPLEX_PULSE)&& \
@@ -146,6 +149,13 @@
{
//���ֹ���ģ����������IJ�����ʼ��
+ /*״̬�ֳ�ʼ*/
+ system_status_word_g.status_word.account_state = (system_function_ctrl_word_g.fun_ctrl_word.account_open == 1)?1:0;
+ system_status_word_g.status_word.valve_lock = (save_valve_para_g.valve_lock_state == VL_LOCK)?1:0;
+ system_status_word_g.status_word.virtual_billing = (system_function_ctrl_word_g.fun_ctrl_word.virtual_billing == 1)?1:0;
+ system_status_word_g.status_word.billing_type = system_function_ctrl_word_g.fun_ctrl_word.billing_type;
+ system_status_word_g.status_word.lcd_mode = system_function_ctrl_word_g.fun_ctrl_word.lcd_mode;
+
/****�ⲿRTC���ü�������ʼ��***********/
Set_Rtc_UpdataInterrupt(); //����RTCΪ���ж�
//��ȡ�ⲿRTCʱ�䣬
@@ -201,7 +211,12 @@
start_rs485_g = RS485_START_REASON_RECORD;
- if(start_rs485_g != RS485_START_REASON_NONE){
+ //�ϱ�֮ǰ�����ɼ�
+ if(start_wrc_g != WRC_MEANS_NONE){
+ start_rs485_g = RS485_START_REASON_REPORT;
+ }
+
+ if(start_rs485_g != RS485_START_REASON_NONE){
start_rs485_g = RS485_START_REASON_NONE;
sys_fun_run_ctrl_p->rs485_ctrl_flag.start_flag = SET;
}
--
Gitblit v1.9.3