File tree Expand file tree Collapse file tree 4 files changed +21
-3
lines changed Expand file tree Collapse file tree 4 files changed +21
-3
lines changed Original file line number Diff line number Diff line change 11Change Log
22======================
33
4+ v1.7
5+ ---------
6+
7+ * Corrected the readVin after sleep bug [ 39] ( https://github.com/sparkfun/OpenLog_Artemis/issues/39 )
8+
49v1.6
510---------
611
Original file line number Diff line number Diff line change 6565 (done) Correct the measurement count misbehaviour (Issue #31)
6666 (done) Use the corrected IMU temperature calculation (Issue #28)
6767 (done) Add individual power-on delays for each sensor type. Add an extended delay for the SCD30. (Issue #5)
68+
69+ (done) v1.7: Fix readVin after sleep bug: https://github.com/sparkfun/OpenLog_Artemis/issues/39
6870*/
6971
7072const int FIRMWARE_VERSION_MAJOR = 1 ;
71- const int FIRMWARE_VERSION_MINOR = 6 ;
73+ const int FIRMWARE_VERSION_MINOR = 7 ;
7274
7375// Define the OLA board identifier:
7476// This is an int which is unique to this variant of the OLA and which allows us
@@ -78,7 +80,7 @@ const int FIRMWARE_VERSION_MINOR = 6;
7880// the variant * 0x100 (OLA = 1; GNSS_LOGGER = 2; GEOPHONE_LOGGER = 3)
7981// the major firmware version * 0x10
8082// the minor firmware version
81- #define OLA_IDENTIFIER 0x116
83+ #define OLA_IDENTIFIER 0x117
8284
8385#include " settings.h"
8486
Original file line number Diff line number Diff line change @@ -321,7 +321,14 @@ void wakeFromSleep()
321321 am_hal_stimer_config (AM_HAL_STIMER_HFRC_3MHZ);
322322
323323 // Turn on ADC
324- ap3_adc_setup ();
324+ uint32_t adcError = (uint32_t )ap3_adc_setup ();
325+ if (settings.logA11 == true ) adcError += (uint32_t )ap3_set_pin_to_analog (11 ); // Set _pad_ 11 to analog if enabled for logging
326+ if (settings.logA12 == true ) adcError += (uint32_t )ap3_set_pin_to_analog (12 ); // Set _pad_ 12 to analog if enabled for logging
327+ if (settings.logA13 == true ) adcError += (uint32_t )ap3_set_pin_to_analog (13 ); // Set _pad_ 13 to analog if enabled for logging
328+ if (settings.logA32 == true ) adcError += (uint32_t )ap3_set_pin_to_analog (32 ); // Set _pad_ 32 to analog if enabled for logging
329+ #if (HARDWARE_VERSION_MAJOR >= 1)
330+ adcError += (uint32_t )ap3_set_pin_to_analog (PIN_VIN_MONITOR); // Set _pad_ PIN_VIN_MONITOR to analog
331+ #endif
325332
326333 // Run setup again
327334
@@ -361,6 +368,10 @@ void wakeFromSleep()
361368 Serial.begin (settings.serialTerminalBaudRate );
362369
363370 printDebug (" wakeFromSleep: I'm awake!\r\n " );
371+ printDebug (" wakeFromSleep: adcError is " + (String)adcError + " ." );
372+ if (adcError > 0 )
373+ printDebug (" This indicates an error was returned by ap3_adc_setup or one of the calls to ap3_set_pin_to_analog." );
374+ printDebug (" \r\n " );
364375
365376 beginQwiic (); // Power up Qwiic bus as early as possible
366377
You can’t perform that action at this time.
0 commit comments