Since this update brings Nerves Heart 2.0 further into use I will re-post the 2.0 changes from the previous edition here before we resume the changelog.
The heart is, if you didn't know, the friendly helper that keeps your device alive if Erlang actually fails. It is the supervisor of all supervisors. It is the Nerves replacement for the Erlang heart module.
BREAKING: the informational attribute names changed to clarify whether they came from the watchdog timer device driver or Nerves heart
Added an optional initialization handshake to protect against :heart.set_callback/2 not being run and an issue going undetected.
Added support for guarded reboot and poweroff requests. These work similar to the reboot and poweroff shell commands, but stop petting the watchdog as well. This protects against rare reboot/poweroff hangs.
Pet the hardware watchdog before exiting to reduce the chance of it rebooting the system early due to unlucky timing from the previous pet.
Remove hardcoded hardware watchdog pet time and calculate based on actual timeout value.
Support Nerves Heart v2.0.0 attributes and features. Nerves Heart v2.0.0 is a major update that addresses rare cases where devices would fail to reboot or detect an issue. It also adds helpful statistics. See the docs for details. Nerves Heart v1.x versions are still supported.
Support guarded reboot and poweroff if Nerves Heart 2.0 is available. Reboots and poweroffs still gracefully stop the VM, but
they now don’t require Busybox reboot or poweroff, and they stop petting the hardware watchdog to set a hard limit.
Support Nerves Heart initialization completion notifications. This lets you protect the time between boot and :heart.set_callback/1 should something happen that prevents the callback from being set. This addresses an issue where the VM would think everything is great since it wasn’t calling the callback to find out that it was not.
This release updates Nerves
Heart to 2.0.1. This is technically a backwards incompatible version, but only if you use Nerves Heart statistics reports in your code. Nerves Heart 2.0 has several improvements to address rare issues and provide better information. The nerves_runtime library has updates to use these new features.
Immediately close I2C bus references after discovery. Waiting for the GC to collect them could cause intermittent failures in rare scenarios where multiple I2C device discoveries are done close together. This likely only affects CI in practice.
Remove Erlang convenience functions since no one used them
Require Elixir 1.10 or later.
Previous versions probably work, but won’t be supported. This opens up the possibility of using Elixir 1.10+ features in future releases.