On 18/12/16 23:50, Sterling Hughes wrote:

I will correct this, thanks. I frequently forget that shell commands are not const. I was too lazy to make them a linker section and const them, which I really should have done.
I've just started playing with this seriously tonight, and some of the values can be tweaked here and there, but overall the first pass at the sensor API is very nice. Great job for a first pass, certainly.

The cfg system works very well since you can define a struct per driver, which solves a lot of issues and keeps things simple. You aren't locked into a situation where you have to work with the lowest common denominator of config settings and options, and can make drivers as basic or feature rich as you like. I think that's important.

One important thing that I believe should be added as mandatory meta-data for every driver, though, is 'driver version'. On long running systems that will see many firmware updates and device iterations or models, you probably want to know which version of the sensor driver you have, and maybe report this with sensor data when logging it so that you can compensate for any bugs that come up in the field. It can also be important with things like OIC where you may need to know not just which sensors are present, but which driver version to know is certain features are available or not. Just thinking out loud here, though. :)

Reply via email to