Browse Source

修改显示板写入模式为定时2s写入

master
zhangsan 5 years ago
parent
commit
3d600a1b23
  1. BIN
      si4/soft_gsm_main.si4project/soft_gsm_main.sip_sym
  2. 17
      source/app/app_task_485_control.c
  3. 2
      source/app/app_task_485_control.h

BIN
si4/soft_gsm_main.si4project/soft_gsm_main.sip_sym

Binary file not shown.

17
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();

2
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;

Loading…
Cancel
Save