LoRa.nvram_save() doesn't save parameters necessary for ADR #68
Description
I have observed this with a LoPy running 1.8.0b1.
For ADR to perform correctly with deep sleep, the AdrAckCounter value must be saved in order for the device to decrease its data rates.
Similarly some information about the channel mask (among other things) and other setup parameters, transferred in the LinkAdrReq etc MAC commands must be persisted for the lifetime of the device session or the device will behave incorrectly. Channel frequency setups for non-US bands are a separate problem. RX1/RX2 timing windows and frequencies should also be persisted.
It looks like persisting LoRaMacParams and AdrAckCounter within LoRaMacNvsSave
and adding some MIB_...
enums to handle them should be sufficient. LoRaMacParams doesn't appear to contain any pointers so it should be straightforward.