One issues I saw working on some sensor drivers (based on the simulated accel as a starting point) is that no 'default' config settings are currently being set, and it seems possible that a sensor might be initialised without calling the config function explicitly.

The config system is great (highly flexible and easy to understand), but would it be better to have a default config setting that is set when the sensor is initialized, or should running the config function at least once be considered mandatory and the assumption made that it is always being called? In that case, should we return an error if something like a read function is called but the sensor hasn't been configured yet to put it into a known state (and probably wake the sensor up since many devices will default to booting into power down mode)?

Reply via email to