adafruit / Adafruit_AS7341

Other
29 stars 18 forks source link

sensor_id unused #24

Closed jrw429 closed 1 year ago

jrw429 commented 1 year ago

In Adafruit_AS7341::begin() it has a parameter sensor_id which is "The unique ID to differentiate the sensors from others". This is passed to _init(), where it is not used. This generates "warning: unused parameter 'sensor_id'". Not sure if the parameter should be dropped, or if it is a real feature waiting to be implemented.

caternuson commented 1 year ago

Looks like a placeholder for potential future use with the Unified Sensor Library: https://github.com/adafruit/Adafruit_Sensor

Can add a line:

(void)sensor_id

in _init to suppress the compiler warn.

jrw429 commented 1 year ago

I agree that would be a good way to fix the warning.

caternuson commented 1 year ago

Closing. Fixed with #23.