]> git.tnoah.ca Git - lora-radio.git/commitdiff
Fix TNC settings not being saved, courtesy of @attermann
authorjacob.eva <x00010@disroot.org>
Thu, 4 Jul 2024 18:02:46 +0000 (19:02 +0100)
committerjacob.eva <x00010@disroot.org>
Thu, 4 Jul 2024 18:02:46 +0000 (19:02 +0100)
Utilities.h

index 849be1b5ef13db3b67f7934b526b0aedf46352e4..bd55d4a4f5e9db91da3f991a7bf2132a30bcb3b6 100644 (file)
@@ -1260,11 +1260,9 @@ void eeprom_update(int mapped_addr, uint8_t byte) {
         }
         written_bytes++;
         
-        if ((mapped_addr - eeprom_addr(0)) == ADDR_INFO_LOCK) {
-            #if !HAS_EEPROM && MCU_VARIANT == MCU_NRF52
+        if (((mapped_addr - eeprom_addr(0)) == ADDR_INFO_LOCK) || (mapped_addr - eeprom_addr(0)) == ADDR_CONF_OK) {
                 // have to do a flush because we're only writing 1 byte and it syncs after 4
                 eeprom_flush();
-            #endif
         }
 
         if (written_bytes >= 4) {