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 10d2d86..bcc1a08 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/source/app/app_task_485_control.c b/source/app/app_task_485_control.c index f2eee6d..16aa660 100644 --- a/source/app/app_task_485_control.c +++ b/source/app/app_task_485_control.c @@ -10,6 +10,7 @@ void L3_task_485_control_init(void) L3_task_s_go(ts_485_control,D_task_init); ts_485_control.total_weight_pool = 0; ts_485_control.rfid_pool = 0; + ts_485_control.sendstmp = 0; } #define D_task_485_control_01 0x51 @@ -20,6 +21,21 @@ void L3_task_485_control_handle(TS_485_control *s) L2_task_go(D_task_485_control_01); TTSS_Task_step(D_task_485_control_01) + if(s_nos_tick.t_1s - s->sendstmp >= 1) + { + s->sendstmp = s_nos_tick.t_1s; + + 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; + + G.md_slaver_info[3].mask = 1; + s->rfid_pool = G.rfid; + } + #if 0 if(s->total_weight_pool != G.total_weight) { G.thrombolytic_val = G.total_weight / 10 * G.p.thrombolytic_ratio / 10; @@ -35,6 +51,7 @@ void L3_task_485_control_handle(TS_485_control *s) G.md_slaver_info[3].mask = 1; s->rfid_pool = G.rfid; } + #endif L2_task_go(D_task_485_control_01); TTSS_Task_end(); diff --git a/source/app/app_task_485_control.h b/source/app/app_task_485_control.h index f4d1f29..f508174 100644 --- a/source/app/app_task_485_control.h +++ b/source/app/app_task_485_control.h @@ -10,6 +10,8 @@ typedef struct TS_task task; S32 total_weight_pool; U16 rfid_pool; + U32 sendstmp; + U8 sendflag; }TS_485_control; extern TS_485_control ts_485_control;