做一个旧项目的维护,看到如下文档,看不懂,请大家帮忙,谢谢!!!!
Value: Several fields with the following structure:
1. Status (8 bits unsigned)
0. Finished
1. Busy
2. Error
3. Unable to measure (not enough power)
4. Unstable signal power
2. Start to Finish time * ms (16 bits)
Bits 0~11: *ms, unsigned
Bits 12~15: *16^, signed
Start to Finish time = [Bits 0~11] * 16^[Bits 12~15] ms
3. Start to current time * ms (16 bits)
Bits 0~11: *ms, unsigned
Bits 12~15: *16^, signed
Start to current time = [Bits 0~11] * 16^[Bits 12~15] ms
==》这里的16^[Bits 12~15]是什么意思?是指数表示法?为什么是16^而不是10^
比如:下命令到现在的时间为1小时,则
计算:1*60*60*1000=3600 000
Bits 0~11: *ms, 应该为:b1110 0001 0000
Bits 12~15: *16^, 应该为:b0011
Start to current time = [Bits 0~11] * 16^[Bits 12~15] ms
Start to current time:3E10
看来代码,好像不对。 |