Review Purpose:
PhoneGap ble plug-in can receive the information sent by the device, but the data received and displayed in the console Xiayi not know the correct data, or due to encoding decoding problems caused by garbled. The problem that this review to solve is to judge whether the data received is correct.
Review process:
1. Bungle conjecture that data has been obtained from the device, but the decoding function used to decode the Arraybuffer data is incorrect.
2. The package teacher does not agree with the view of the State, in order to verify the wrong guess, the package teacher let Xiayi replaced the serial assistant, and let the device send a string and 16 binary number. Results the output of the program and the package teacher expected the result one to, that is, decoding the decoding function used is not a problem. So why is there a messy data?
3. By observing the data output each time, Mr. Yang knew that each group of data consisted of 20 numbers, and the state mentioned that there were 10 channels in the agreement, each of which consisted of two bytes (high eight-bit and low eight-bit). So Miss Yang guessed that the 20 numbers corresponded to the high eight-bit and low eight-bit of the 10 channels respectively. Let Xiayi add a "," to each output number, and then observe the 20 numbers separately.
4. Since the data obtained from the Bongona four should represent the humidity (high eight, low eight), the temperature (high eight, low eight-bit), the value is basically unchanged, and the temperature can be measured immediately, so Yang teacher and bag teacher asked to focus on the last two.
5. The output and actual measurement results are correct. As a result, the data received is correct and the data displayed in the console is correct.
Review Experience:
Xiayi to the correct understanding of the phenomenon of "error" has a profound experience, uncertain things do not immediately make judgments, no experimental support produced by the conclusion is unreliable. "There is no right to say without investigation." Thank you teacher! Thank you, brother and sister!
March 31, 2016 _ The group of review