r-map / rmap

rete monitoraggio ambientale partecipativo documentation at https://doc.rmap.cc
https://rmap.cc
53 stars 42 forks source link

firmware: SensorDriver library cannot manage multiple sensors istance #360

Closed pat1 closed 2 years ago

pat1 commented 2 years ago

In SensorDriver library the status of one sensor are in namespace _SensorDriver: https://github.com/r-map/rmap/blob/ca0c21aa1a007e5b0d87cb5e18026bed83781c15/platformio/libraries/SensorDriver/SensorDriver.cpp#L37

If I try to use two sensors of the same type it cannot work.

pat1 commented 2 years ago

more: some vaiables in SensorDriver library are static and not per object istance