v01d commented on pull request #2039: URL: https://github.com/apache/incubator-nuttx/pull/2039#issuecomment-713908277
Where is this wtgahrs.c file? It does not seem to be part of this PR. Maybe I'm missing something. Regarding the sensor model itself, it is difficult for me to evaluate how well it maps to existing sensors. I think there's a risk of this being too restrictive and it is something that you will only find out when you try to look at various drivers and see if they all can work the same way or their behaviour would change. That said, we could merge this and consider it a feature that needs more evaluation before fully embracing it (and porting all drivers to it). I wouldn't want to have two sets of drivers: those that work with this interface and a lot of others that do not. Maybe as you say, it is a matter of slowly evolving this into something that considers all scenarios. Regarding the buffer, there are two points here. First, I think that for some drivers it is better to have the option of having no *extra* buffer at all. The posix read() will supply a buffer where the driver can directly write into. I don't think it makes sense for all cases to have an intermediate buffer. In that case, I would expect the intermediate buffer be skipped. Second, consider adding support for dropping old values when the queue is full. This came up recently with the ADC driver: most times you care more about last N values than first N values until buffer is full. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to 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