hamishcunningham / fishy-wifi

Scripts, notes and the odd subaquatic gizmo for the ESP8266 and what-have-you.
GNU Affero General Public License v3.0
25 stars 13 forks source link

Fix -127C readings for water temperature sensor #22

Open Eroc33 opened 6 years ago

Eroc33 commented 6 years ago

This should fix the water temp sensor giving spurious readings of -127C (indicating disconnected). Note this is probably the same root cause as in my comment on the DHT issue, but this type of in-tree fix, while easier to maintain doesn't seem to work for the DHT (the timing of setting interrupts seems to be more crucial for the DHT sensor for some reason).

For review: Should I add comments mentioning why this workaround is here?

layerzerolabs commented 6 years ago

I think a couple of words of comment might help others, especially as this workaround might end up persisting for a bit - as according to https://github.com/espressif/arduino-esp32/pull/835#issue-273902858 RTOS sei/cli get nested whereas a single arduino sei just re-enables interrupts...