diff --git a/keilp/cc_as_stc02_gsm_main.uvproj b/keilp/cc_as_stc02_gsm_main.uvproj index c314c7e..0d90277 100644 --- a/keilp/cc_as_stc02_gsm_main.uvproj +++ b/keilp/cc_as_stc02_gsm_main.uvproj @@ -491,6 +491,11 @@ 1 ..\source\bsp\bsp_gm35.c + + bsp_relay.c + 1 + ..\source\bsp\bsp_relay.c + diff --git a/si4/soft_gsm_main.si4project/soft_gsm_main.sip_sym b/si4/soft_gsm_main.si4project/soft_gsm_main.sip_sym index 8a4f8b0..2c4bded 100644 Binary files a/si4/soft_gsm_main.si4project/soft_gsm_main.sip_sym and b/si4/soft_gsm_main.si4project/soft_gsm_main.sip_sym differ diff --git a/si4/soft_gsm_main.si4project/soft_gsm_main.sip_xm b/si4/soft_gsm_main.si4project/soft_gsm_main.sip_xm index 9bde1c7..20f8fa1 100644 Binary files a/si4/soft_gsm_main.si4project/soft_gsm_main.sip_xm and b/si4/soft_gsm_main.si4project/soft_gsm_main.sip_xm differ diff --git a/si4/soft_gsm_main.si4project/soft_gsm_main.siwork b/si4/soft_gsm_main.si4project/soft_gsm_main.siwork index 81d8b10..d3baf6b 100644 Binary files a/si4/soft_gsm_main.si4project/soft_gsm_main.siwork and b/si4/soft_gsm_main.si4project/soft_gsm_main.siwork differ diff --git a/source/app/app_task_485_control.c b/source/app/app_task_485_control.c index c1dd4a1..f2eee6d 100644 --- a/source/app/app_task_485_control.c +++ b/source/app/app_task_485_control.c @@ -22,9 +22,9 @@ void L3_task_485_control_handle(TS_485_control *s) TTSS_Task_step(D_task_485_control_01) if(s->total_weight_pool != G.total_weight) { - G.thrombolytic_val = G.total_weight / 100 * G.p.thrombolytic_ratio; - G.bolus_val = G.thrombolytic_val / 10 * G.p.bolus_ratio; - G.hold_val = G.thrombolytic_val / 10 * G.p.hold_ratio; + G.thrombolytic_val = G.total_weight / 10 * G.p.thrombolytic_ratio / 10; + G.bolus_val = G.thrombolytic_val * G.p.bolus_ratio / 10; + G.hold_val = G.thrombolytic_val * G.p.hold_ratio / 10; G.md_slaver_info[2].mask = 1; s->total_weight_pool = G.total_weight; diff --git a/source/app/main.c b/source/app/main.c index b48baab..974ae48 100644 --- a/source/app/main.c +++ b/source/app/main.c @@ -53,7 +53,7 @@ stc5ac32s void L0_main_init(void) { - //L2_relay_init(); + L2_relay_init(); ///step : 1>>>>>>>>>引脚选择相关>>>>>>>>> L0_pin_config(); diff --git a/source/bsp/bsp_relay.c b/source/bsp/bsp_relay.c index c014753..48fc8be 100644 --- a/source/bsp/bsp_relay.c +++ b/source/bsp/bsp_relay.c @@ -58,6 +58,7 @@ void _CBC_HANDLER(U8 oper) } } +#if 0 struct _s_relay_oper s_relay_oper[RELAY_NUM] = { //status这里全部为RELAY_BI,如果系统看门狗重启,值会保存在flash_page0,从而读取设定 @@ -86,8 +87,9 @@ U8 L2_relay_convert_and_do(int i,int val) } return oper; } +#endif -#if 1 +#if 0 void L1_relay_on(vU8 n,vU8 val) { U8 i = 0; @@ -114,7 +116,7 @@ void L1_relay_on(vU8 n,vU8 val) } } } -#else +//#else void L1_relay_on(vU8 n,vU8 val) { U8 i = 0; @@ -151,6 +153,7 @@ void L1_relay_on(vU8 n,vU8 val) } #endif +#if 0 void L2_do_relay(U8 *buf) { U8 val = buf[0], index = buf[1] ,i = 0; @@ -178,6 +181,41 @@ void L2_do_relay(U8 *buf) } } } +#endif + +#if 0 +//全关(断开) +void L2_relay_poweroff_all(void) +{ + _CBC_HANDLER(RELAY_KAI); + L1_relay_on(RELAY_PC, RELAY_KAI); + L1_relay_on(RELAY_PRINTER, RELAY_KAI); + L1_relay_on(RELAY_PRINTER_1, RELAY_KAI); +} + +void L2_relay_poweron_all(void) +{ + U8 i = 0; + _CBC_HANDLER(RELAY_BI); + for(i=0;i