Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
SOS 14 flashes on Device OS v1.2.1-rc.3 with PietteTech_DHT library #1835
Calling DHT.acquireAndWait() from the PietteTech_DHT library should function as expected (and as it did on prior Device OS versions).
DHT.acquireAndWait() is causing issues on an Argon and a Xenon with Device OS v1.2.1-rc.3. I was able to reproduce the issue even with the DHT_simple example from the library. Whenever this line is executed, the device begins an SOS red LED sequence with 14 flashes following the SOS, which should be indicating a semaphore lock timeout.
Steps to Reproduce
Update to Device OS v1.2.1-rc.3 on an Argon or Xenon device. Flash the DHT_simple example from the PietteTech_DHT library. Reset the device. Wait for the device to connect and execute the acquireAndWait() line.
DHT_simple example from PietteTech_DHT library
Thanks for reporting the issue. We've added additional safety checks in 1.2.x line (#1761) to ensure that no heap allocations or frees happen from an ISR and panic code 14 now has a more generic meaning:
I suggest removing
That may prove difficult as it would mean you couldn't have multiple instances of that class for independent sensors.
What am I missing?
Can we have a ISR save version of
The class itself can have some pin-to-instance based mapping for example. Alternatively as I've mentioned,
The function itself is not freed. Whenever you pass something that isn't a non-capturing lambda or a function matching
Potentially, yes, however the current implementation relies on heap in both