Skip to content

Commit 8a96636

Browse files
V1.8.48 - Updates
- Added some extra logging around EEPROM handling - Moved some initialization code to a later stage during boot.
1 parent 99cf850 commit 8a96636

File tree

5 files changed

+67
-55
lines changed

5 files changed

+67
-55
lines changed

Software/Arduino code/OpenAstroTracker/Configuration_adv.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@
243243
#define DEBUG_MEADE 0x0040
244244
#define DEBUG_VERBOSE 0x0080
245245
#define DEBUG_STEPPERS 0x0100
246+
#define DEBUG_EEPROM 0x0200
246247
#define DEBUG_ANY 0xFFFF
247248

248249
////////////////////////////
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
#define VERSION "V1.8.47"
1+
#define VERSION "V1.8.48"

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@
99
// Initialize the EEPROM object for ESP boards, settign aside 32 bytes for storage
1010
void EPROMStore::initialize()
1111
{
12-
LOGV1(DEBUG_VERBOSE, F("EEPROM[ESP]: Startup with 32 bytes"));
12+
LOGV1(DEBUG_EEPROM, F("EEPROM[ESP]: Startup with 32 bytes"));
1313
EEPROM.begin(32);
1414
}
1515

1616
// Update the given location with the given value
1717
void EPROMStore::update(int location, uint8_t value)
1818
{
19-
LOGV3(DEBUG_VERBOSE, F("EEPROM[ESP]: Writing %x to %d"), value, location);
19+
LOGV3(DEBUG_EEPROM, F("EEPROM[ESP]: Writing %x to %d"), value, location);
2020
EEPROM.write(location, value);
21-
LOGV1(DEBUG_VERBOSE, F("EEPROM[ESP]: Committing"));
21+
LOGV1(DEBUG_EEPROM, F("EEPROM[ESP]: Committing"));
2222
EEPROM.commit();
2323
}
2424

@@ -27,7 +27,7 @@ uint8_t EPROMStore::read(int location)
2727
{
2828
uint8_t value;
2929
value = EEPROM.read(location);
30-
LOGV3(DEBUG_VERBOSE, F("EEPROM[ESP]: Read %x from %d"), value, location);
30+
LOGV3(DEBUG_EEPROM, F("EEPROM[ESP]: Read %x from %d"), value, location);
3131
return value;
3232
}
3333

@@ -36,29 +36,29 @@ uint8_t EPROMStore::read(int location)
3636
// Initialize the EEPROM storage in a platform-independent abstraction
3737
void EPROMStore::initialize()
3838
{
39-
LOGV1(DEBUG_VERBOSE, F("EEPROM[UNO]: Startup "));
39+
LOGV1(DEBUG_EEPROM, F("EEPROM[Uno/Mega]: Startup "));
4040
}
4141

4242
// Update the given location with the given value
4343
void EPROMStore::update(int location, uint8_t value)
4444
{
45-
//LOGV3(DEBUG_VERBOSE, F("EEPROM[UNO]: Writing8 %x to %d"), value, location);
45+
LOGV3(DEBUG_EEPROM, F("EEPROM[Uno/Mega]: Writing8 %x to %d"), value, location);
4646
EEPROM.write(location, value);
4747
}
4848

4949
// Read the value at the given location
5050
uint8_t EPROMStore::read(int location)
5151
{
5252
uint8_t value = EEPROM.read(location);
53-
//LOGV3(DEBUG_VERBOSE, F("EEPROM[UNO]: Read8 %x from %d"), value, location);
53+
LOGV3(DEBUG_EEPROM, F("EEPROM[Uno/Mega]: Read8 %x from %d"), value, location);
5454
return value;
5555
}
5656

5757
#endif
5858

5959
void EPROMStore::updateInt16(int loByteAddr, int hiByteAddr, int16_t value)
6060
{
61-
//LOGV4(DEBUG_VERBOSE, F("EEPROM: Writing16 %d to %d, %d"), value, loByteAddr, hiByteAddr);
61+
LOGV5(DEBUG_EEPROM, F("EEPROM: Writing16 %x (%d) to %d, %d"), value, value, loByteAddr, hiByteAddr);
6262
update(loByteAddr, value & 0x00FF);
6363
update(hiByteAddr, (value >> 8) & 0x00FF);
6464
}
@@ -69,13 +69,13 @@ int16_t EPROMStore::readInt16(int loByteAddr, int hiByteAddr)
6969
uint8_t valHi = EPROMStore::read(hiByteAddr);
7070
uint16_t uValue = (uint16_t)valLo + (uint16_t)valHi * 256;
7171
int16_t value = static_cast<int16_t>(uValue);
72-
//LOGV4(DEBUG_VERBOSE, F("EEPROM: Read16 %d from %d, %d"), value, loByteAddr, hiByteAddr);
72+
LOGV5(DEBUG_EEPROM, F("EEPROM: Read16 %x (%d) from %d, %d"), value, value, loByteAddr, hiByteAddr);
7373
return value;
7474
}
7575

7676
void EPROMStore::updateInt32(int lowestByteAddr, int32_t value)
7777
{
78-
LOGV4(DEBUG_VERBOSE, F("EEPROM: Writing32 %l to %d-%d"), value, lowestByteAddr, lowestByteAddr + 3);
78+
LOGV5(DEBUG_EEPROM, F("EEPROM: Writing32 %x (%l) to %d-%d"), value, value, lowestByteAddr, lowestByteAddr + 3);
7979
update(lowestByteAddr, value & 0x00FF);
8080
update(lowestByteAddr + 1, (value >> 8) & 0x00FF);
8181
update(lowestByteAddr + 2, (value >> 16) & 0x00FF);
@@ -88,9 +88,9 @@ int32_t EPROMStore::readInt32(int lowestByteAddr)
8888
uint8_t val2 = EPROMStore::read(lowestByteAddr + 1);
8989
uint8_t val3 = EPROMStore::read(lowestByteAddr + 2);
9090
uint8_t val4 = EPROMStore::read(lowestByteAddr + 3);
91-
LOGV5(DEBUG_INFO, F("EEPROM: Read32 read these bytes: %x %x %x %x"), val1, val2, val3, val4);
91+
LOGV5(DEBUG_EEPROM, F("EEPROM: Read32 read these bytes: %x %x %x %x"), val1, val2, val3, val4);
9292
uint32_t uValue = (uint32_t)val1 + (uint32_t)val2 * 256 + (uint32_t)val3 * 256 * 256 + (uint32_t)val4 * 256 * 256 * 256;
9393
int32_t value = static_cast<int32_t>(uValue);
94-
LOGV4(DEBUG_INFO, F("EEPROM: Read32 which is %l from %d-%d"), value, lowestByteAddr, lowestByteAddr + 3);
94+
LOGV4(DEBUG_EEPROM, F("EEPROM: Read32 which is %l from %d-%d"), value, lowestByteAddr, lowestByteAddr + 3);
9595
return value;
9696
}

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

Lines changed: 45 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,6 @@ Mount::Mount(int stepsPerRADegree, int stepsPerDECDegree, LcdMenu* lcdMenu) {
160160
_pitchCalibrationAngle = 0;
161161
_rollCalibrationAngle = 0;
162162
#endif
163-
164-
readPersistentData();
165163
}
166164

167165
/////////////////////////////////
@@ -236,91 +234,99 @@ void Mount::readPersistentData()
236234
{
237235
// Read the magic marker byte and state
238236
uint16_t marker = EPROMStore::readInt16(4, 5);
237+
LOGV2(DEBUG_INFO|DEBUG_EEPROM, F("Mount: EEPROM: Magic Marker: %x "), marker);
238+
239+
#if DEBUG_LEVEL & DEBUG_EEPROM
240+
LOGV1(DEBUG_EEPROM, ((marker & EEPROM_MAGIC_MASK) == EEPROM_MAGIC_MARKER) ? F("EEPROM has values") : F("EEPROM does NOT have values"));
241+
LOGV1(DEBUG_EEPROM, ((marker & EEPROM_MAGIC_EXTENDED_MASK) == EEPROM_MAGIC_EXTENDED_MARKER) ? F("EEPROM has extended values") : F("EEPROM does NOT have extended values"));
242+
#endif
239243

240-
LOGV2(DEBUG_INFO, F("Mount: EEPROM: Magic Marker: %x "), marker);
241244

242245
if ((marker & EEPROM_MAGIC_MASK_RA_STEPS) == EEPROM_RA_STEPS_MARKER_BIT) {
243246
_stepsPerRADegree = EPROMStore::read(6) + EPROMStore::read(7) * 256;
244-
LOGV2(DEBUG_INFO,F("Mount: EEPROM: RA Marker OK! RA steps/deg is %d"), _stepsPerRADegree);
247+
LOGV2(DEBUG_INFO|DEBUG_EEPROM,F("Mount: EEPROM: RA Marker OK! RA steps/deg is %d"), _stepsPerRADegree);
245248
}
246249
else{
247-
LOGV1(DEBUG_INFO,F("Mount: EEPROM: No stored value for RA steps"));
250+
LOGV1(DEBUG_INFO|DEBUG_EEPROM,F("Mount: EEPROM: No stored value for RA steps"));
248251
}
249252

250253
if ((marker & EEPROM_MAGIC_MASK_DEC_STEPS) == EEPROM_DEC_STEPS_MARKER_BIT) {
251254
_stepsPerDECDegree = EPROMStore::read(8) + EPROMStore::read(9) * 256;
252-
LOGV2(DEBUG_INFO,F("Mount: EEPROM: DEC Marker OK! DEC steps/deg is %d"), _stepsPerDECDegree);
255+
LOGV2(DEBUG_INFO|DEBUG_EEPROM,F("Mount: EEPROM: DEC Marker OK! DEC steps/deg is %d"), _stepsPerDECDegree);
253256
}
254257
else{
255-
LOGV1(DEBUG_INFO,F("Mount: EEPROM: No stored value for DEC steps"));
258+
LOGV1(DEBUG_INFO|DEBUG_EEPROM,F("Mount: EEPROM: No stored value for DEC steps"));
256259
}
257260

258261
float speed = 1.0;
259262
if ((marker & EEPROM_MAGIC_MASK_SPEED_FACTOR) == EEPROM_SPEED_FACTOR_MARKER_BIT) {
260263
int adjust = EPROMStore::read(0) + EPROMStore::read(3) * 256;
261264
speed = 1.0 + 1.0 * adjust / 10000.0;
262-
LOGV3(DEBUG_INFO,F("Mount: EEPROM: Speed Marker OK! Speed adjust is %d, speedFactor is %f"), adjust, speed);
265+
LOGV3(DEBUG_INFO|DEBUG_EEPROM,F("Mount: EEPROM: Speed Marker OK! Speed adjust is %d, speedFactor is %f"), adjust, speed);
263266
}
264267
else{
265-
LOGV1(DEBUG_INFO,F("Mount: EEPROM: No stored value for speed factor"));
268+
LOGV1(DEBUG_INFO|DEBUG_EEPROM,F("Mount: EEPROM: No stored value for speed factor"));
266269
}
267270

268271
if ((marker & EEPROM_MAGIC_MASK_BACKLASH_STEPS) == EEPROM_BACKLASH_STEPS_MARKER_BIT) {
269272
_backlashCorrectionSteps = EPROMStore::read(10) + EPROMStore::read(11) * 256;
270-
LOGV2(DEBUG_INFO,F("Mount: EEPROM: Backlash Steps Marker OK! Backlash correction is %d"), _backlashCorrectionSteps);
273+
LOGV2(DEBUG_INFO|DEBUG_EEPROM,F("Mount: EEPROM: Backlash Steps Marker OK! Backlash correction is %d"), _backlashCorrectionSteps);
271274
}
272275
else {
273-
LOGV1(DEBUG_INFO,F("Mount: EEPROM: No stored value for backlash correction"));
276+
LOGV1(DEBUG_INFO|DEBUG_EEPROM,F("Mount: EEPROM: No stored value for backlash correction"));
274277
}
275278

276279
if ((marker & EEPROM_MAGIC_MASK_LATITUDE) == EEPROM_LATITUDE_MARKER_BIT) {
277280
_latitude = 1.0f * EPROMStore::readInt16(12, 13) / 100.0f;
278-
LOGV2(DEBUG_INFO,F("Mount: EEPROM: Latitude Marker OK! Latitude is %f"), _latitude);
281+
LOGV2(DEBUG_INFO|DEBUG_EEPROM,F("Mount: EEPROM: Latitude Marker OK! Latitude is %f"), _latitude);
279282
}
280283
else {
281-
LOGV1(DEBUG_INFO,F("Mount: EEPROM: No stored value for latitude"));
284+
LOGV1(DEBUG_INFO|DEBUG_EEPROM,F("Mount: EEPROM: No stored value for latitude"));
282285
}
283286

284287
if ((marker & EEPROM_MAGIC_MASK_LONGITUDE) == EEPROM_LONGITUDE_MARKER_BIT) {
285288
_longitude = 1.0f * EPROMStore::readInt16(14, 15) / 100.0f;
286-
LOGV2(DEBUG_INFO,F("Mount: EEPROM: Longitude Marker OK! Longitude is %f"), _longitude);
289+
LOGV2(DEBUG_INFO|DEBUG_EEPROM,F("Mount: EEPROM: Longitude Marker OK! Longitude is %f"), _longitude);
287290
}
288291
else {
289-
LOGV1(DEBUG_INFO,F("Mount: EEPROM: No stored value for longitude"));
292+
LOGV1(DEBUG_INFO|DEBUG_EEPROM,F("Mount: EEPROM: No stored value for longitude"));
290293
}
291294

292295
#if USE_GYRO_LEVEL == 1
293296
if ((marker & EEPROM_MAGIC_MASK_PITCH_OFFSET) == EEPROM_PITCH_OFFSET_MARKER_BIT) {
294297
uint16_t angleValue = EPROMStore::readInt16(17, 18);
295298
_pitchCalibrationAngle = (((long)angleValue) - 16384) / 100.0;
296-
LOGV3(DEBUG_INFO,F("Mount: EEPROM: Pitch Offset Marker OK! Pitch Offset is %x (%f)"), angleValue, _pitchCalibrationAngle);
299+
LOGV3(DEBUG_INFO|DEBUG_EEPROM,F("Mount: EEPROM: Pitch Offset Marker OK! Pitch Offset is %x (%f)"), angleValue, _pitchCalibrationAngle);
297300
}
298301
else{
299-
LOGV1(DEBUG_INFO,F("Mount: EEPROM: No stored value for Pitch Offset"));
302+
LOGV1(DEBUG_INFO|DEBUG_EEPROM,F("Mount: EEPROM: No stored value for Pitch Offset"));
300303
}
301304

302305
if ((marker & EEPROM_MAGIC_MASK_ROLL_OFFSET) == EEPROM_ROLL_OFFSET_MARKER_BIT) {
303306
uint16_t angleValue = EPROMStore::readInt16(19,20);
304307
_rollCalibrationAngle = (((long)angleValue) - 16384) / 100.0;
305-
LOGV3(DEBUG_INFO,F("Mount: EEPROM: Roll Offset Marker OK! Roll Offset is %x (%f)"), angleValue, _rollCalibrationAngle);
308+
LOGV3(DEBUG_INFO|DEBUG_EEPROM,F("Mount: EEPROM: Roll Offset Marker OK! Roll Offset is %x (%f)"), angleValue, _rollCalibrationAngle);
306309
}
307310
else {
308-
LOGV1(DEBUG_INFO,F("Mount: EEPROM: No stored value for Roll Offset"));
311+
LOGV1(DEBUG_INFO|DEBUG_EEPROM,F("Mount: EEPROM: No stored value for Roll Offset"));
309312
}
310313
#endif
311314

312315
if ((marker & EEPROM_MAGIC_EXTENDED_MASK) == EEPROM_MAGIC_EXTENDED_MARKER) {
313-
LOGV2(DEBUG_INFO,F("Mount: EEPROM: Magic Marker is %x, reading extended"), marker);
316+
LOGV2(DEBUG_INFO|DEBUG_EEPROM,F("Mount: EEPROM: Magic Marker is %x, reading extended"), marker);
314317
int16_t nextMarker = EPROMStore::readInt16(21,22);
315-
LOGV2(DEBUG_INFO,F("Mount: EEPROM: ExtendedMarker is %x"), nextMarker);
318+
LOGV2(DEBUG_INFO|DEBUG_EEPROM,F("Mount: EEPROM: ExtendedMarker bitfield is %x"), nextMarker);
316319
if (nextMarker & EEPROM_PARKING_POS_MARKER_BIT){
317320
_raParkingPos = EPROMStore::readInt32(23); // 23-26
318321
_decParkingPos = EPROMStore::readInt32(27); // 27-30
319-
LOGV3(DEBUG_INFO,F("Mount: EEPROM: Parking position read as R:%l, D:%l"), _raParkingPos, _decParkingPos);
322+
LOGV3(DEBUG_INFO|DEBUG_EEPROM,F("Mount: EEPROM: Parking position read as R:%l, D:%l"), _raParkingPos, _decParkingPos);
323+
}
324+
else{
325+
LOGV1(DEBUG_INFO|DEBUG_EEPROM,F("Mount: EEPROM: No stored value for Parking position"));
320326
}
321327
}
322328
else {
323-
LOGV1(DEBUG_INFO,F("Mount: EEPROM: No ExtendedMarker present"));
329+
LOGV1(DEBUG_INFO|DEBUG_EEPROM,F("Mount: EEPROM: No ExtendedMarker present"));
324330
}
325331

326332
setSpeedCalibration(speed, false);
@@ -341,16 +347,16 @@ void Mount::writePersistentData(int which, long val)
341347

342348
// If we're written something before...
343349
uint16_t magicMarker = EPROMStore::read(5) * 256 + EPROMStore::read(4);
344-
LOGV3(DEBUG_INFO,F("Mount: EEPROM Write(%d): Marker is %x"), which, magicMarker);
350+
LOGV3(DEBUG_INFO|DEBUG_EEPROM,F("Mount: EEPROM Write(%d): Marker is %x"), which, magicMarker);
345351
if ((magicMarker & EEPROM_MAGIC_MASK) == EEPROM_MAGIC_MARKER) {
346352
// ... read the current state ...
347353
flag = EPROMStore::read(4);
348354
if ((magicMarker & EEPROM_MAGIC_EXTENDED_MASK) == EEPROM_MAGIC_EXTENDED_MARKER) {
349355
extendedFlag = EPROMStore::readInt16(21, 22);
350-
LOGV3(DEBUG_INFO,F("Mount: EEPROM Write: Marker is 0xBF, extended flag is %x (%d)"), extendedFlag, extendedFlag);
356+
LOGV3(DEBUG_INFO|DEBUG_EEPROM,F("Mount: EEPROM Write: Marker is 0xBF, extended flag is %x (%d)"), extendedFlag, extendedFlag);
351357
}
352358
else{
353-
LOGV3(DEBUG_INFO,F("Mount: EEPROM Write: Marker is 0xBE, flag is %x (%d)"), flag, flag);
359+
LOGV3(DEBUG_INFO|DEBUG_EEPROM,F("Mount: EEPROM Write: Marker is 0xBE, flag is %x (%d)"), flag, flag);
354360
}
355361
}
356362
switch (which) {
@@ -360,7 +366,7 @@ void Mount::writePersistentData(int which, long val)
360366
flag |= EEPROM_RA_STEPS_BIT;
361367
loByteLocation = 6;
362368
hiByteLocation = 7;
363-
LOGV2(DEBUG_INFO,F("Mount: EEPROM Write: Updating RA steps to %d"), val);
369+
LOGV2(DEBUG_INFO|DEBUG_EEPROM,F("Mount: EEPROM Write: Updating RA steps to %d"), (int)val);
364370
}
365371
break;
366372

@@ -370,7 +376,7 @@ void Mount::writePersistentData(int which, long val)
370376
flag |= EEPROM_DEC_STEPS_BIT;
371377
loByteLocation = 8;
372378
hiByteLocation = 9;
373-
LOGV2(DEBUG_INFO,F("Mount: EEPROM Write: Updating DEC steps to %d"), val);
379+
LOGV2(DEBUG_INFO|DEBUG_EEPROM,F("Mount: EEPROM Write: Updating DEC steps to %d"), (int)val);
374380
}
375381
break;
376382

@@ -380,7 +386,7 @@ void Mount::writePersistentData(int which, long val)
380386
flag |= EEPROM_SPEED_FACTOR_BIT;
381387
loByteLocation = 0;
382388
hiByteLocation = 3;
383-
LOGV2(DEBUG_INFO,F("Mount: EEPROM Write: Updating Speed factor to %d"), val);
389+
LOGV2(DEBUG_INFO|DEBUG_EEPROM,F("Mount: EEPROM Write: Updating Speed factor to %d"), (int)val);
384390
}
385391
break;
386392

@@ -390,7 +396,7 @@ void Mount::writePersistentData(int which, long val)
390396
flag |= EEPROM_BACKLASH_STEPS_BIT;
391397
loByteLocation = 10;
392398
hiByteLocation = 11;
393-
LOGV2(DEBUG_INFO,F("Mount: EEPROM Write: Updating Backlash to %d"), val);
399+
LOGV2(DEBUG_INFO|DEBUG_EEPROM,F("Mount: EEPROM Write: Updating Backlash to %d"), (int)val);
394400
}
395401
break;
396402

@@ -400,7 +406,7 @@ void Mount::writePersistentData(int which, long val)
400406
flag |= EEPROM_LATITUDE_BIT;
401407
loByteLocation = 12;
402408
hiByteLocation = 13;
403-
LOGV2(DEBUG_INFO,F("Mount: EEPROM Write: Updating Latitude to %d"), val);
409+
LOGV2(DEBUG_INFO|DEBUG_EEPROM,F("Mount: EEPROM Write: Updating Latitude to %d"), (int)val);
404410
}
405411
break;
406412

@@ -410,7 +416,7 @@ void Mount::writePersistentData(int which, long val)
410416
flag |= EEPROM_LONGITUDE_BIT;
411417
loByteLocation = 14;
412418
hiByteLocation = 15;
413-
LOGV2(DEBUG_INFO,F("Mount: EEPROM Write: Updating Longitude to %d"), val);
419+
LOGV2(DEBUG_INFO|DEBUG_EEPROM,F("Mount: EEPROM Write: Updating Longitude to %d"), (int)val);
414420
}
415421
break;
416422

@@ -420,7 +426,7 @@ void Mount::writePersistentData(int which, long val)
420426
flag |= EEPROM_PITCH_OFFSET_BIT;
421427
loByteLocation = 17;
422428
hiByteLocation = 18;
423-
LOGV2(DEBUG_INFO,F("Mount: EEPROM Write: Updating Pitch Offset to %d"), val);
429+
LOGV2(DEBUG_INFO|DEBUG_EEPROM,F("Mount: EEPROM Write: Updating Pitch Offset to %d"), (int)val);
424430
}
425431
break;
426432

@@ -430,7 +436,7 @@ void Mount::writePersistentData(int which, long val)
430436
flag |= EEPROM_ROLL_OFFSET_BIT;
431437
loByteLocation = 19;
432438
hiByteLocation = 20;
433-
LOGV2(DEBUG_INFO,F("Mount: EEPROM Write: Updating Roll Offset to %d"), val);
439+
LOGV2(DEBUG_INFO|DEBUG_EEPROM,F("Mount: EEPROM Write: Updating Roll Offset to %d"), (int)val);
434440
}
435441
break;
436442

@@ -442,30 +448,30 @@ void Mount::writePersistentData(int which, long val)
442448
extendedFlag |= EEPROM_PARKING_POS_MARKER_BIT;
443449
if (which == EEPROM_RA_PARKING_POS ){
444450
EPROMStore::updateInt32(23, val);
445-
LOGV2(DEBUG_INFO,F("Mount: EEPROM Write: Updating RA Parking Pos to %l at 23-26"), val);
451+
LOGV2(DEBUG_INFO|DEBUG_EEPROM,F("Mount: EEPROM Write: Updating RA Parking Pos to %l at 23-26"), val);
446452
}
447453
else{
448454
EPROMStore::updateInt32(27, val);
449-
LOGV2(DEBUG_INFO,F("Mount: EEPROM Write: Updating DEC Parking Pos to %l at 27-30"), val);
455+
LOGV2(DEBUG_INFO|DEBUG_EEPROM,F("Mount: EEPROM Write: Updating DEC Parking Pos to %l at 27-30"), val);
450456
}
451457
}
452458
break;
453459
}
454460

455461

456462
if (writeExtended) {
457-
LOGV3(DEBUG_INFO,F("Mount: EEPROM Write: New Marker is 0xBF, extended flag is %x (%d)"), extendedFlag, extendedFlag);
463+
LOGV3(DEBUG_INFO|DEBUG_EEPROM,F("Mount: EEPROM Write: New Marker is 0xBF, extended flag is %x (%d)"), extendedFlag, extendedFlag);
458464
EPROMStore::update(5, EEPROM_MAGIC_EXTENDED_MARKER >> 8);
459465
EPROMStore::updateInt16(21, 22, extendedFlag);
460466
}
461467
else {
462-
LOGV4(DEBUG_INFO,F("Mount: EEPROM Write: New Marker is %d, flag is %x (%d)"), magicMarker, flag, flag);
468+
LOGV4(DEBUG_INFO|DEBUG_EEPROM,F("Mount: EEPROM Write: New Marker is %d, flag is %x (%d)"), magicMarker, flag, flag);
463469
EPROMStore::update(4, flag);
464470
EPROMStore::update(5, magicMarker >> 8);
465471

472+
LOGV5(DEBUG_INFO|DEBUG_EEPROM,F("Mount: EEPROM Write: Writing %x to %d and %x to %d"), (int)(val & 0x00FF), loByteLocation, (int)((val >> 8) & 0x00FF), hiByteLocation);
466473
EPROMStore::update(loByteLocation, val & 0x00FF);
467474
EPROMStore::update(hiByteLocation, (val >> 8) & 0x00FF);
468-
LOGV5(DEBUG_INFO,F("Mount: EEPROM Write: Wrote %x to %d and %x to %d"), val & 0x00FF, loByteLocation, (val >> 8) & 0x00FF, hiByteLocation);
469475
}
470476
}
471477

0 commit comments

Comments
 (0)