unsigned char OVERTIME_RECORD[600]={0x41,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x31,
0x13,0x04,0x11,0x01,0x01,0x03,
0x13,0x04,0x11,0x09,0x09,0x04,
0x0a,0xd7,0x0a,0xd7,0x0a,0xd7,0x0a,0xd7,0x0a,0xd7,
0x0a,0xd7,0x0a,0xd7,0x0a,0xd7,0x0a,0xd7,0x0a,0xd7,
0x41,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x32,
0x13,0x04,0x11,0x12,0x12,0x05,
0x13,0x04,0x11,0x19,0x19,0x06,
0x0a,0xd7,0x0a,0xd7,0x0a,0xd7,0x0a,0xd7,0x0a,0xd7,
0x0a,0xd7,0x0a,0xd7,0x0a,0xd7,0x0a,0xd7,0x0a,0xd7,
0x41,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x33,
0x13,0x04,0x11,0x12,0x13,0x07,
0x13,0x04,0x11,0x19,0x22,0x08,
0x0a,0xd7,0x0a,0xd7,0x0a,0xd7,0x0a,0xd7,0x0a,0xd7,
0x0a,0xd7,0x0a,0xd7,0x0a,0xd7,0x0a,0xd7,0x0a,0xd7,
.......
}
for(count=0;count<12;count++)
{
for(i=0;i<18;i++)
{
send_data_uart1(OVERTIME_RECORD[i+50*count]);
}
}
如何检测到OVERTIME_RECORD数组里的值为0时,就跳出 for(count=0;count<12;count++)循环,我是用个指针来判断的,后来失败了,请哪位大侠帮我解决一下哦,谢谢。 |