#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 0 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; } #else if(s->total_weight_pool != G.jing_weight) { G.thrombolytic_val = G.jing_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.jing_weight; } if(s->rfid_pool != G.rfid) { G.md_slaver_info[3].mask = 1; s->rfid_pool = G.rfid; } #endif L2_task_go(D_task_485_control_01); TTSS_Task_end(); }