110110 the SPI lines low, preventing communication with the IMU: https://github.com/sparkfun/OpenLog_Artemis/issues/104
111111
112112 v2.2:
113- Use Apollo3 v2.2 .0 with changes by paulvha to fix Issue 117 (Thank you Paul!)
113+ Use Apollo3 v2.1 .0 with changes by paulvha to fix Issue 117 (Thank you Paul!)
114114 https://github.com/sparkfun/OpenLog_Artemis/issues/117#issuecomment-1034973065
115+ https://github.com/sparkfun/Arduino_Apollo3/issues/279#issuecomment-710060977
115116 Also includes Paul's SPI.end fix
116117 https://github.com/sparkfun/Arduino_Apollo3/issues/442
118+ In libraries/SPI/src/SPI.cpp change end() to:
119+ void arduino::MbedSPI::end() {
120+ if (dev) {
121+ delete dev;
122+ dev = NULL;
123+ }
124+ }
117125 Use SdFat v2.1.2
118126 Compensate for missing / not-populated IMU
119127 Add support for yyyy/mm/dd and ISO 8601 date style (Issue 118)
@@ -486,7 +494,7 @@ void setup() {
486494
487495 // If we are sleeping between readings then we cannot rely on millis() as it is powered down
488496 // Use RTC instead
489- measurementStartTime = bestMillis ();
497+ measurementStartTime = rtcMillis ();
490498
491499 digitalWrite (PIN_STAT_LED, LOW); // Turn the STAT LED off now that everything is configured
492500
@@ -553,12 +561,12 @@ void loop() {
553561
554562 // If we are sleeping between readings then we cannot rely on millis() as it is powered down
555563 // Use RTC instead
556- lastSeriaLogSyncTime = bestMillis (); // Reset the last sync time to now
564+ lastSeriaLogSyncTime = rtcMillis (); // Reset the last sync time to now
557565 newSerialData = true ;
558566 }
559567 else if (newSerialData == true )
560568 {
561- if ((bestMillis () - lastSeriaLogSyncTime) > MAX_IDLE_TIME_MSEC) // If we haven't received any characters recently then sync log file
569+ if ((rtcMillis () - lastSeriaLogSyncTime) > MAX_IDLE_TIME_MSEC) // If we haven't received any characters recently then sync log file
562570 {
563571 if (incomingBufferSpot > 0 )
564572 {
@@ -574,7 +582,7 @@ void loop() {
574582 }
575583
576584 newSerialData = false ;
577- lastSeriaLogSyncTime = bestMillis (); // Reset the last sync time to now
585+ lastSeriaLogSyncTime = rtcMillis (); // Reset the last sync time to now
578586 printDebug (" Total chars received: " + (String)charsReceived + " \r\n " );
579587 }
580588 }
@@ -666,9 +674,9 @@ void loop() {
666674 }
667675
668676 // Force sync every 500ms
669- if (bestMillis () - lastDataLogSyncTime > 500 )
677+ if (rtcMillis () - lastDataLogSyncTime > 500 )
670678 {
671- lastDataLogSyncTime = bestMillis ();
679+ lastDataLogSyncTime = rtcMillis ();
672680 sensorDataFile.sync ();
673681 if (settings.frequentFileAccessTimestamps == true )
674682 updateDataFileAccess (&sensorDataFile); // Update the file access time & date
@@ -725,7 +733,7 @@ void loop() {
725733 {
726734 // Check if we have been awake long enough (millis is reset to zero when waking from sleep)
727735 // goToSleep will automatically compensate for how long we have been awake
728- if ((bestMillis () - lastAwakeTimeMillis) < settings.minimumAwakeTimeMillis )
736+ if ((rtcMillis () - lastAwakeTimeMillis) < settings.minimumAwakeTimeMillis )
729737 return ; // Too early to sleep - leave sleepAfterRead set true
730738 }
731739
0 commit comments