Skip to content

Commit 7935ee8

Browse files
V1.8.49 - Updates
- Fixed a bug in EEPROM update routine. Magic marker was not being written on uninitialized EEPROM.
1 parent 8a96636 commit 7935ee8

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
#define VERSION "V1.8.48"
1+
#define VERSION "V1.8.49"

Software/Arduino code/OpenAstroTracker/src/Mount.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,7 @@ void Mount::writePersistentData(int which, long val)
359359
LOGV3(DEBUG_INFO|DEBUG_EEPROM,F("Mount: EEPROM Write: Marker is 0xBE, flag is %x (%d)"), flag, flag);
360360
}
361361
}
362+
362363
switch (which) {
363364
case EEPROM_RA:
364365
{
@@ -460,12 +461,14 @@ void Mount::writePersistentData(int which, long val)
460461

461462

462463
if (writeExtended) {
463-
LOGV3(DEBUG_INFO|DEBUG_EEPROM,F("Mount: EEPROM Write: New Marker is 0xBF, extended flag is %x (%d)"), extendedFlag, extendedFlag);
464-
EPROMStore::update(5, EEPROM_MAGIC_EXTENDED_MARKER >> 8);
464+
magicMarker |= EEPROM_MAGIC_EXTENDED_MARKER;
465+
LOGV4(DEBUG_INFO|DEBUG_EEPROM,F("Mount: EEPROM Write: New Marker is %x, extended flag is %x (%d)"), magicMarker, extendedFlag, extendedFlag);
466+
EPROMStore::update(5, magicMarker >> 8);
465467
EPROMStore::updateInt16(21, 22, extendedFlag);
466468
}
467469
else {
468-
LOGV4(DEBUG_INFO|DEBUG_EEPROM,F("Mount: EEPROM Write: New Marker is %d, flag is %x (%d)"), magicMarker, flag, flag);
470+
magicMarker |= EEPROM_MAGIC_MARKER;
471+
LOGV4(DEBUG_INFO|DEBUG_EEPROM,F("Mount: EEPROM Write: New Marker is %x, flag is %x (%d)"), magicMarker, flag, flag);
469472
EPROMStore::update(4, flag);
470473
EPROMStore::update(5, magicMarker >> 8);
471474

0 commit comments

Comments
 (0)