1

Closed

Error in sensor reading parsing

description

Currently the whole sensor reading is converted to single LONGLONG (__int64) number, and individual data fields need to be extracted by numeric manipulation on this number. And while it worked fine for the temp/humiditi sensor, for 3-axis accel. that needs more space it seems some values are truncated.
 
On the attached screenshot you can see it is parsed correctly in ProcessReadData, but after calling GetDataValuesForObject it is already truncated.

file attachments

Closed Jan 23, 2010 at 7:40 AM by kobush
Reversed order of operations in SensorBaseDriver::ProcessReadData

comments

kobush wrote Jan 23, 2010 at 7:39 AM

I found that this problem was caused by wrong order of operations at the end of SensorBaseDriver::ProcessReadData. It was first sending the update event and then actually updated the m_pObjectProperties->m_llSensorReading field. When I reversed this order it now works as expected.

wrote Jan 23, 2010 at 7:40 AM

wrote Feb 13, 2013 at 3:20 AM

wrote May 16, 2013 at 1:12 AM