FirmwareRecoveryDataSource
Persists the PendingFirmwareRecovery record for a firmware update that may have left a device stranded in bootloader mode, plus the last BLE node as a candidate for one. Only the most recent of each is retained (updates are one-device-at-a-time in practice).
Properties
The last node this app completed a BLE handshake with, kept so that node can be recovered when it turns up in its bootloader without the app having started the update that stranded it. Not shown by itself; a bootloader seen at its address promotes it to pending via promoteLastBleNode.
The pending recovery record, or null when no interrupted update is outstanding.
Functions
Clears both records. Clearing only pending would let the next bootloader sighting promote lastBleNode straight back; it returns on the next successful handshake.
Makes lastBleNode the pending recovery, unless one is already pending or the last node is no longer the one at fullAddress: a handshake with another node can replace it between the bootloader sighting and this call.
Records recovery as the outstanding interrupted update, replacing any previous record.
Records node as the last BLE node, replacing any previous one.