Skip to content

Commit 95b79a5

Browse files
committed
Merge branch 'main' into release_candidate_v2
2 parents 49c6eb2 + d8a0db5 commit 95b79a5

File tree

14 files changed

+238
-210
lines changed

14 files changed

+238
-210
lines changed
236 KB
Binary file not shown.
237 KB
Binary file not shown.
235 KB
Binary file not shown.

CHANGELOG.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,20 @@ v1.11
55
---------
66

77
* Adds support for the ICM-20948 Digital Motion Processor [47](https://github.com/sparkfun/OpenLog_Artemis/issues/47)
8-
* The OLA's orientation can be logged as a 6-axis or 9-axis Quaternion
8+
* The OLA's orientation can be logged as a 6-axis or 9-axis Quaternion. Note: only Quat9 provides absolute orientation - using the magnetometer. Quat6 uses the accel and gyro only
9+
* Open Menu 3 and select option 12 to enable the DMP
910
* Adds support for exFAT microSD cards [34](https://github.com/sparkfun/OpenLog_Artemis/issues/34)
11+
* Based on v2.0.6 of Bill Greiman's SdFat library
1012
* Adds a minimum awake time, making it easier to open the Serial menu when the OLA is sleeping between measurements [83](https://github.com/sparkfun/OpenLog_Artemis/issues/83)
11-
* Adds support for the Qwiic Button [81](https://github.com/sparkfun/OpenLog_Artemis/issues/81)
12-
* Buttons with I2C addresses 0x68 to 0x6F are supported
1313
* Adds support for the Bio Sensor Hub Pulse Oximeter and Heart Rate Sensor [81](https://github.com/sparkfun/OpenLog_Artemis/issues/81)
1414
* Requires exclusive use of pins 32 and 11
15+
* Open Menu 6 (Detect / Configure Attached Devices) to enable Oximeter detection
1516
* Adds stand-alone examples for:
1617
* ICM-20948 DMP (orientation in Quat6 and Quat9)
1718
* GNSS RAWX logging
1819
* GNSS TIM-TM2 logging
20+
* Does not add support for the Qwiic Button [81](https://github.com/sparkfun/OpenLog_Artemis/issues/81)
21+
* We tried to add support for the QB, but it uses I2C clock stretching and causes all kinds of badness with the Artemis
1922

2023
v1.10
2124
---------

Firmware/OpenLog_Artemis/OpenLog_Artemis.ino

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
The Board should be set to SparkFun Apollo3 \ RedBoard Artemis ATP.
1515
1616
Please note: this version of the firmware compiles on v2.1.0 of the Apollo3 boards.
17-
17+
1818
(At the time of writing, data logging with the the u-blox ZED-F9P is problematic when using v2.1.1 of the core.)
1919
2020
v1.0 Power Consumption:
@@ -93,8 +93,10 @@
9393
(done) Add ICM-20948 DMP support. Requires v1.2.6 of the ICM-20948 library. DMP logging is limited to: Quat6 or Quat9, plus raw accel, gyro and compass. https://github.com/sparkfun/OpenLog_Artemis/issues/47
9494
(done) Add support for exFAT. Requires v2.0.6 of Bill Greiman's SdFat library. https://github.com/sparkfun/OpenLog_Artemis/issues/34
9595
(done) Add minimum awake time: https://github.com/sparkfun/OpenLog_Artemis/issues/83
96-
(done) Add support for the Pulse Oximeter and Qwiic Button: https://github.com/sparkfun/OpenLog_Artemis/issues/81
97-
96+
(done) Add support for the Pulse Oximeter: https://github.com/sparkfun/OpenLog_Artemis/issues/81
97+
(done - but does not work) Add support for the Qwiic Button. The QB uses clock-stretching and the Artemis really doesn't enjoy that...
98+
(done) Increase DMP data resolution to five decimal places https://github.com/sparkfun/OpenLog_Artemis/issues/90
99+
98100
(in progress) Update to Apollo3 v2.1.1 - FIRMWARE_VERSION_MAJOR = 2.
99101
(done) Implement printf float (OLA uses printf float in _so_ many places...): https://github.com/sparkfun/Arduino_Apollo3/issues/278
100102
(worked around) attachInterrupt(PIN_POWER_LOSS, powerDownOLA, FALLING); causes badness - https://github.com/sparkfun/Arduino_Apollo3/issues/416
@@ -268,7 +270,7 @@ icm_20948_DMP_data_t dmpData; // Global storage for the DMP data - extracted fro
268270
#include "SparkFun_SGP40_Arduino_Library.h" // Click here to get the library: http://librarymanager/All#SparkFun_SGP40
269271
#include "SparkFun_SDP3x_Arduino_Library.h" // Click here to get the library: http://librarymanager/All#SparkFun_SDP3x
270272
#include "MS5837.h" // Click here to download the library: https://github.com/sparkfunX/BlueRobotics_MS5837_Library
271-
#include "SparkFun_Qwiic_Button.h" // Click here to get the library: http://librarymanager/All#SparkFun_Qwiic_Button_Switch
273+
//#include "SparkFun_Qwiic_Button.h" // Click here to get the library: http://librarymanager/All#SparkFun_Qwiic_Button_Switch
272274
#include "SparkFun_Bio_Sensor_Hub_Library.h" // Click here to get the library: http://librarymanager/All#SparkFun_Bio_Sensor
273275

274276
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
@@ -358,7 +360,7 @@ void setup() {
358360
qwiicPowerOnDelayMillis = worstCaseQwiicPowerOnDelay;
359361

360362
EEPROM.init();
361-
363+
362364
beginQwiic(); // Turn the qwiic power on as early as possible
363365

364366
beginSD(); //285 - 293ms
@@ -453,7 +455,7 @@ void setup() {
453455
loadDeviceSettingsFromFile(); //Load config settings into node list
454456
configureQwiicDevices(); //Apply config settings to each device in the node list
455457
int deviceCount = printOnlineDevice(); // Pretty-print the online devices
456-
458+
457459
if ((deviceCount == 0) && (settings.resetOnZeroDeviceCount == true)) // Check for resetOnZeroDeviceCount
458460
{
459461
if ((Serial.available()) || ((settings.useTxRxPinsForTerminal == true) && (Serial1.available())))
@@ -486,7 +488,7 @@ void setup() {
486488
}
487489

488490
void loop() {
489-
491+
490492
checkBattery(); // Check for low battery
491493

492494
if ((Serial.available()) || ((settings.useTxRxPinsForTerminal == true) && (Serial1.available())))
@@ -497,15 +499,15 @@ void loop() {
497499
size_t timestampCharsLeftToWrite = strlen(serialTimestamp);
498500
//SerialPrintf2("timestampCharsLeftToWrite is %d\r\n", timestampCharsLeftToWrite);
499501
//SerialFlush();
500-
502+
501503
if (Serial1.available() || (timestampCharsLeftToWrite > 0))
502504
{
503505
while (Serial1.available() || (timestampCharsLeftToWrite > 0))
504506
{
505507
if (timestampCharsLeftToWrite > 0) // Based on code written by @DennisMelamed in PR #70
506508
{
507509
incomingBuffer[incomingBufferSpot++] = serialTimestamp[0]; // Add a timestamp character to incomingBuffer
508-
510+
509511
for (size_t i = 0; i < timestampCharsLeftToWrite; i++)
510512
{
511513
serialTimestamp[i] = serialTimestamp[i+1]; // Shuffle the remaining chars along by one
@@ -526,7 +528,7 @@ void loop() {
526528
serialTimestamp[strlen(serialTimestamp) - 1] = 0x0A; // Change the final comma of the timestamp to a Line Feed
527529
}
528530
}
529-
531+
530532
if (incomingBufferSpot == sizeof(incomingBuffer))
531533
{
532534
digitalWrite(PIN_STAT_LED, HIGH); //Toggle stat LED to indicating log recording
@@ -732,7 +734,7 @@ uint32_t howLongToSleepFor(void)
732734
//We need to be careful with the multiply as we will overflow uint32_t if msToSleep is > 131072
733735

734736
//goToSleep will automatically compensate for how long we have been awake
735-
737+
736738
uint32_t msToSleep;
737739

738740
if (checkSleepOnFastSlowPin())
@@ -762,7 +764,7 @@ uint32_t howLongToSleepFor(void)
762764
{
763765
msToSleep = (uint32_t)(settings.usBetweenReadings / 1000ULL); // Sleep for usBetweenReadings
764766
}
765-
767+
766768
uint32_t sysTicksToSleep;
767769
if (msToSleep < 131000)
768770
{
@@ -818,7 +820,7 @@ bool checkSleepOnRTCTime(void)
818820
{
819821
myRTC.getTime(); // Get the RTC time
820822
int minutesOfDay = (myRTC.hour * 60) + myRTC.minute;
821-
823+
822824
if (settings.slowLoggingStartMOD > settings.slowLoggingStopMOD) // If slow logging starts later than the stop time (i.e. slow over midnight)
823825
{
824826
if ((minutesOfDay >= settings.slowLoggingStartMOD) || (minutesOfDay < settings.slowLoggingStopMOD))
@@ -963,7 +965,7 @@ void configureSerial1TxRx(void) // Configure pins 12 and 13 for UART1 TX and RX
963965
pinConfigRx.ePullup = AM_HAL_GPIO_PIN_PULLUP_WEAK; // Put a weak pull-up on the Rx pin
964966
pin_config(PinName(BREAKOUT_PIN_RX), pinConfigRx);
965967
}
966-
968+
967969
void beginIMU()
968970
{
969971
pinMode(PIN_IMU_POWER, OUTPUT);
@@ -1030,7 +1032,7 @@ void beginIMU()
10301032
}
10311033

10321034
bool success = true;
1033-
1035+
10341036
//Check if we are using the DMP
10351037
if (settings.imuUseDMP == false)
10361038
{
@@ -1040,7 +1042,7 @@ void beginIMU()
10401042
{
10411043
SerialPrintln(F("Error: Could not startup the IMU in non-DMP mode!"));
10421044
success = false;
1043-
}
1045+
}
10441046
//Update the full scale and DLPF settings
10451047
retval = myICM.enableDLPF(ICM_20948_Internal_Acc, settings.imuAccDLPF);
10461048
if (retval != ICM_20948_Stat_Ok)

Firmware/OpenLog_Artemis/Sensors.ino

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ void getData()
9999
if (myICM.dataReady())
100100
{
101101
//printDebug("getData: myICM.dataReady = " + (String)myICM.dataReady() + "\r\n");
102-
102+
103103
myICM.getAGMT(); //Update values
104-
104+
105105
if (settings.logIMUAccel)
106106
{
107107
olaftoa(myICM.accX(), tempData1, 2, sizeof(tempData1) / sizeof(char));
@@ -312,15 +312,15 @@ void gatherDeviceValues()
312312
int adjustedHour = nodeDevice->getHour();
313313
if (settings.hour24Style == false)
314314
if (adjustedHour > 12) adjustedHour -= 12;
315-
315+
316316
char gnssHourStr[3];
317317
char gnssMinStr[3];
318318
char gnssSecStr[3];
319319
char gnssMillisStr[4];
320320
int gnssMin = nodeDevice->getMinute();
321321
int gnssSec = nodeDevice->getSecond();
322322
int gnssMillis = nodeDevice->getMillisecond();
323-
323+
324324
if (adjustedHour < 10)
325325
sprintf(gnssHourStr, "0%d", adjustedHour);
326326
else
@@ -339,7 +339,7 @@ void gatherDeviceValues()
339339
sprintf(gnssMillisStr, "0%d", gnssMillis);
340340
else
341341
sprintf(gnssMillisStr, "%d", gnssMillis);
342-
342+
343343
sprintf(tempData, "%s:%s:%s.%s,", gnssHourStr, gnssMinStr, gnssSecStr, gnssMillisStr);
344344
strcat(outputData, tempData);
345345
}
@@ -752,7 +752,7 @@ void gatherDeviceValues()
752752
}
753753
else
754754
nodeDevice->setDataRate(ADS122C04_DATA_RATE_20SPS); // Default to 20Hz
755-
755+
756756
if (nodeSetting->logCentigrade)
757757
{
758758
olaftoa(nodeDevice->readPT100Centigrade(), tempData1, 3, sizeof(tempData) / sizeof(char));
@@ -1003,7 +1003,7 @@ void gatherDeviceValues()
10031003
sprintf(tempData, "%s,", tempData1);
10041004
strcat(outputData, tempData);
10051005
}
1006-
1006+
10071007
long clickedPopped = 0;
10081008
while (nodeDevice->isClickedQueueEmpty() == false)
10091009
{
@@ -1016,7 +1016,7 @@ void gatherDeviceValues()
10161016
sprintf(tempData, "%s,", tempData1);
10171017
strcat(outputData, tempData);
10181018
}
1019-
1019+
10201020
if (nodeSetting->toggleLEDOnClick)
10211021
{
10221022
if (nodeSetting->ledState)
@@ -1490,20 +1490,20 @@ void printHelperText(bool terminalOnly)
14901490
}
14911491
}
14921492
break;
1493-
case DEVICE_QWIIC_BUTTON:
1494-
{
1495-
struct_QWIIC_BUTTON *nodeSetting = (struct_QWIIC_BUTTON *)temp->configPtr;
1496-
if (nodeSetting->log)
1497-
{
1498-
if (nodeSetting->logPressed)
1499-
strcat(helperText, "pressS,");
1500-
if (nodeSetting->logClicked)
1501-
strcat(helperText, "clickS,");
1502-
if (nodeSetting->toggleLEDOnClick)
1503-
strcat(helperText, "LED,");
1504-
}
1505-
}
1506-
break;
1493+
// case DEVICE_QWIIC_BUTTON:
1494+
// {
1495+
// struct_QWIIC_BUTTON *nodeSetting = (struct_QWIIC_BUTTON *)temp->configPtr;
1496+
// if (nodeSetting->log)
1497+
// {
1498+
// if (nodeSetting->logPressed)
1499+
// strcat(helperText, "pressS,");
1500+
// if (nodeSetting->logClicked)
1501+
// strcat(helperText, "clickS,");
1502+
// if (nodeSetting->toggleLEDOnClick)
1503+
// strcat(helperText, "LED,");
1504+
// }
1505+
// }
1506+
// break;
15071507
case DEVICE_BIO_SENSOR_HUB:
15081508
{
15091509
struct_BIO_SENSOR_HUB *nodeSetting = (struct_BIO_SENSOR_HUB *)temp->configPtr;
@@ -1598,7 +1598,7 @@ void setMaxI2CSpeed()
15981598
{
15991599
checkBattery();
16001600
delay(1);
1601-
}
1601+
}
16021602
}
16031603

16041604
//Read the VIN voltage

0 commit comments

Comments
 (0)