本帖最后由 wwh199169 于 2011-11-6 02:15 编辑
else { if(num1 != 12800) { Print(HAL_LCD_LINE_2,48,ch,1); //显示温度值 Print(HAL_LCD_LINE_2,105,"℃",1); //显示摄氏度标示
℃ }; }; } else { P0_7=1; Print(HAL_LCD_LINE_2,48," 护理中...",1); //同上一句作用相同,但这一句用来取消病人发出的“求助”报警 }; break; case(1): if (num2==8500) break; if (cancel_alarm2 == 0) { if (num2==12800) { P0DIR|=0x80; P0_7=0; Print(HAL_LCD_LINE_3,48," 求助! ",0); for(t=0;t<10;t++) MicroWait( 30000 ); P0_7=1; Print(HAL_LCD_LINE_3,48," ",1); //显示温度值 for(t=0;t<10;t++) MicroWait( 10000 ); }; if ((num2 >=2500 || num2 <=0) && num2 !=12800) { if (cancel_alarm2 == 0) { P0DIR|=0x80; P0_7=0; Print(HAL_LCD_LINE_3,48," 体温过高!",1); for(t=0;t<10;t++) MicroWait( 30000 ); P0_7=1; Print(HAL_LCD_LINE_3,48,ch,1); //显示温度值 Print(HAL_LCD_LINE_3,105,"℃",1); //显示摄氏度标示
℃ for(t=0;t<10;t++) MicroWait( 10000 ); } else { P0_7=1; Print(HAL_LCD_LINE_3,48," 护理中...",1); //显示温度值 Print(HAL_LCD_LINE_3,105,"℃",1); //显示摄氏度标示
℃ }; } else { if(num2 != 12800) { Print(HAL_LCD_LINE_3,48,ch,1); //显示温度值 Print(HAL_LCD_LINE_3,105,"℃",1); //显示摄氏度标示
℃ }; }; } else { P0_7=1; Print(HAL_LCD_LINE_3,48," 护理中...",1); //显示温度值 }; break; }; UART_SendMsg.check = SPIMgr_CalcFCS((uint8*)&UART_SendMsg.cmd, 11); //串口数据检验码 HalUARTWrite(SPI_MGR_DEFAULT_PORT,&UART_SendMsg.start_frame, 13); //发送串口数据
Debug_HalUARTWrite( SPI_MGR_DEFAULT_PORT, "node messagereceived!", 22 );//显示接收成功信息 } |