#include "app_task_485_control.h" #include "../msp/uart0.h" #include "../app/app_common.h" TS_485_control ts_485_control; void L3_task_485_control_init(void) { L1_task_init(&ts_485_control.task); L3_task_s_go(ts_485_control,D_task_init); ts_485_control.total_weight_pool = 0; ts_485_control.rfid_pool = 0; } #define D_task_485_control_01 0x51 void L3_task_485_control_handle(TS_485_control *s) { TTSS_Task_init(); L2_task_go(D_task_485_control_01); 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.md_slaver_info[2].mask = 1; s->total_weight_pool = G.total_weight; } if(s->rfid_pool != G.rfid) { G.md_slaver_info[3].mask = 1; s->rfid_pool = G.rfid; } L2_task_go(D_task_485_control_01); TTSS_Task_end(); }