r-map / rmap

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

firmware: SensorDriver retry management #371

Closed pat1 closed 2 years ago

pat1 commented 2 years ago

in https://doc.rmap.cc/stima_v3/development_guide/development_guide.html#sensordriver

uint32_t_t getDelay()
    ritorna il valore in millisecondi indicante l’attesa richiesta

is not clear at what is referred sure is the time to wait between prepare and get, but at

https://github.com/r-map/rmap/blob/69cd23d50b1c73bd7b6c88eb3f5ffa9af6ff52db/platformio/libraries/SensorDriver/SensorDriver.cpp#L774

the delay is setted after an error on get()

In stima firmware is not used: https://github.com/r-map/rmap/blob/69cd23d50b1c73bd7b6c88eb3f5ffa9af6ff52db/platformio/stima_v3/stima/src/stima.ino#L2368

but in i2c_th is used: https://github.com/r-map/rmap/blob/182dc3fa8a4afdcea2c31659aa67f6a22ffe8d5b/platformio/stima_v3/i2c-th/src/i2c-th.ino#L868

this before my last commit: https://github.com/r-map/rmap/commit/fe42f2af21f1cf03f146d330e5b6dfa78b2bb589#diff-6a31d64e62fc76a1e1a09b083c6219e76b5a1b520e5b632314df84563439746bL832