ccollins476ad opened a new pull request #1260: hw/sensor: Limit a sensor to one 
error callback
URL: https://github.com/apache/mynewt-core/pull/1260
 
 
   ### Prior to this PR
   each sensor had a list of "error listeners." Each listener was associated 
with one or more sensor data types via a bitmap.  When a read error occurred, 
the sensor manager would notify each error listener whose bitmap shared at 
least one set bit with the bitmap indicating the type of data being read.
   
   The idea was that the application could attach different behaviors to read 
errors, depending on the type of data that the sensor failed to read.  However, 
this idea was misguided, because when a driver's read callback reports failure, 
the sensor manager doesn't know the specific type of data that was being read 
when the error occurred.  So, all the sensor manager can tell the application 
is that there was an error communicating with a particular sensor.
   
   ### After PR
   Each sensor has only a single error callback.  If a communication error 
occurs during sample collection, this callback gets called (if configured).  
The callback no longer has a data type bitmap.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to