| | |
| | | #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; |
| | |
| | | |
| | | 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)&& \ |
| | |
| | | { |
| | | //¸÷ÖÖ¹¦ÄÜÄ£¿éÔËÐÐËùÐèµÄ²ÎÊý³õʼ»¯ |
| | | |
| | | /*״̬×Ö³õʼ*/ |
| | | 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ʱ¼ä£¬ |
| | |
| | | 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; |
| | | } |