Skip to content

Commit 76d5e5a

Browse files
authored
Merge pull request #189 from sparkfun/release_candidate
v2.6
2 parents 329030b + 7799e14 commit 76d5e5a

23 files changed

+951
-156
lines changed

.github/workflows/build-for-release.yml

Lines changed: 54 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ jobs:
3030
echo "firmwareMinor=$(grep -Po "(?<=FIRMWARE_VERSION_MINOR = )([0-9])*(?=;$)" ./Firmware/${{ env.FILENAME_PREFIX }}/${{ env.FILENAME_PREFIX }}.ino)" >> "$GITHUB_ENV"
3131
3232
- name: Get firmware version 2
33-
run: echo "firmwareMajorMinor=-V10-v${{ env.firmwareMajor }}${{ env.firmwareMinor }}" >> "$GITHUB_ENV"
33+
run: |
34+
echo "firmwareMajorMinor=-V10-v${{ env.firmwareMajor }}${{ env.firmwareMinor }}" >> "$GITHUB_ENV"
35+
echo "firmwareMajorMinorX04=-X04-v${{ env.firmwareMajor }}${{ env.firmwareMinor }}" >> "$GITHUB_ENV"
3436
3537
- name: Setup Arduino CLI
3638
uses: arduino/setup-arduino-cli@v1
@@ -76,6 +78,8 @@ jobs:
7678
"SparkFun ADS1015 Arduino Library"
7779
"SparkFun KX13X Arduino Library"
7880
"SparkFun SDP3x Arduino Library"
81+
"SparkFun LPS28DFW Arduino Library"
82+
"SparkFun VEML7700 Arduino Library"
7983

8084
- name: Enable external libs
8185
run: arduino-cli config set library.enable_unsafe_install true
@@ -84,6 +88,9 @@ jobs:
8488
run: arduino-cli lib install --git-url
8589
https://github.com/bluerobotics/BlueRobotics_MS5837_Library.git
8690

91+
- name: Enable ICM20948 DMP
92+
run: sed -i 's|//#define ICM_20948_USE_DMP|#define ICM_20948_USE_DMP|g' /home/runner/Arduino/libraries/SparkFun_9DoF_IMU_Breakout_-_ICM_20948_-_Arduino_Library/src/util/ICM_20948_C.h
93+
8794
- name: Patch Apollo3 Core
8895
run: |
8996
cd ./Extras
@@ -102,7 +109,6 @@ jobs:
102109
103110
- name: Compile Sketch
104111
run: arduino-cli compile -v -e -b SparkFun:apollo3:sfe_artemis_atp ./Firmware/${{ env.FILENAME_PREFIX }}/${{ env.FILENAME_PREFIX }}.ino
105-
--build-property "compiler.cpp.extra_flags=\"-DICM_20948_USE_DMP\""
106112

107113
- name: Rename binary
108114
run: |
@@ -116,6 +122,52 @@ jobs:
116122
- name: Move binary
117123
run: mv ${{ env.targetBinary }} ./Binaries
118124

125+
- name: Enable Power Loss Protection
126+
run: sed -i 's|//#define noPowerLossProtection|#define noPowerLossProtection|g' ./Firmware/${{ env.FILENAME_PREFIX }}/${{ env.FILENAME_PREFIX }}.ino
127+
128+
- name: Compile Sketch
129+
run: arduino-cli compile -v -e -b SparkFun:apollo3:sfe_artemis_atp ./Firmware/${{ env.FILENAME_PREFIX }}/${{ env.FILENAME_PREFIX }}.ino
130+
131+
- name: Rename binary
132+
run: |
133+
cd ./Firmware/${{ env.FILENAME_PREFIX }}/build/SparkFun.apollo3.sfe_artemis_atp/
134+
mv ${{ env.FILENAME_PREFIX }}.ino.bin ${{ env.FILENAME_PREFIX }}${{ env.firmwareMajorMinor }}-NoPowerLossProtection.bin
135+
echo "targetBinary=./Firmware/${{ env.FILENAME_PREFIX }}/build/SparkFun.apollo3.sfe_artemis_atp/${{ env.FILENAME_PREFIX }}${{ env.firmwareMajorMinor }}-NoPowerLossProtection.bin" >> "$GITHUB_ENV"
136+
rm *.axf
137+
rm *.hex
138+
rm *.map
139+
140+
- name: Move binary
141+
run: mv ${{ env.targetBinary }} ./Binaries
142+
143+
- name: Disable Power Loss Protection
144+
run: sed -i 's|#define noPowerLossProtection|//#define noPowerLossProtection|g' ./Firmware/${{ env.FILENAME_PREFIX }}/${{ env.FILENAME_PREFIX }}.ino
145+
146+
- name: X04 Hardware
147+
run: |
148+
sed -i 's|#define HARDWARE_VERSION_MAJOR 1|#define HARDWARE_VERSION_MAJOR 0|g' ./Firmware/${{ env.FILENAME_PREFIX }}/${{ env.FILENAME_PREFIX }}.ino
149+
sed -i 's|#define HARDWARE_VERSION_MINOR 0|#define HARDWARE_VERSION_MINOR 4|g' ./Firmware/${{ env.FILENAME_PREFIX }}/${{ env.FILENAME_PREFIX }}.ino
150+
151+
- name: Compile Sketch
152+
run: arduino-cli compile -v -e -b SparkFun:apollo3:sfe_artemis_atp ./Firmware/${{ env.FILENAME_PREFIX }}/${{ env.FILENAME_PREFIX }}.ino
153+
154+
- name: Rename binary
155+
run: |
156+
cd ./Firmware/${{ env.FILENAME_PREFIX }}/build/SparkFun.apollo3.sfe_artemis_atp/
157+
mv ${{ env.FILENAME_PREFIX }}.ino.bin ${{ env.FILENAME_PREFIX }}${{ env.firmwareMajorMinorX04 }}.bin
158+
echo "targetBinary=./Firmware/${{ env.FILENAME_PREFIX }}/build/SparkFun.apollo3.sfe_artemis_atp/${{ env.FILENAME_PREFIX }}${{ env.firmwareMajorMinorX04 }}.bin" >> "$GITHUB_ENV"
159+
rm *.axf
160+
rm *.hex
161+
rm *.map
162+
163+
- name: Move binary
164+
run: mv ${{ env.targetBinary }} ./Binaries
165+
166+
- name: V01 Hardware
167+
run: |
168+
sed -i 's|#define HARDWARE_VERSION_MAJOR 0|#define HARDWARE_VERSION_MAJOR 1|g' ./Firmware/${{ env.FILENAME_PREFIX }}/${{ env.FILENAME_PREFIX }}.ino
169+
sed -i 's|#define HARDWARE_VERSION_MINOR 4|#define HARDWARE_VERSION_MINOR 0|g' ./Firmware/${{ env.FILENAME_PREFIX }}/${{ env.FILENAME_PREFIX }}.ino
170+
119171
- uses: actions-js/push@master
120172
with:
121173
github_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/non-release-build.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ jobs:
7373
"SparkFun ADS1015 Arduino Library"
7474
"SparkFun KX13X Arduino Library"
7575
"SparkFun SDP3x Arduino Library"
76+
"SparkFun LPS28DFW Arduino Library"
77+
"SparkFun VEML7700 Arduino Library"
7678

7779
- name: Enable external libs
7880
run: arduino-cli config set library.enable_unsafe_install true
@@ -81,6 +83,9 @@ jobs:
8183
run: arduino-cli lib install --git-url
8284
https://github.com/bluerobotics/BlueRobotics_MS5837_Library.git
8385

86+
- name: Enable ICM20948 DMP
87+
run: sed -i 's|//#define ICM_20948_USE_DMP|#define ICM_20948_USE_DMP|g' /home/runner/Arduino/libraries/SparkFun_9DoF_IMU_Breakout_-_ICM_20948_-_Arduino_Library/src/util/ICM_20948_C.h
88+
8489
- name: Patch Apollo3 Core
8590
run: |
8691
cd ./Extras
@@ -94,7 +99,6 @@ jobs:
9499
95100
- name: Compile Sketch
96101
run: arduino-cli compile -v -e -b SparkFun:apollo3:sfe_artemis_atp ./Firmware/${{ env.FILENAME_PREFIX }}/${{ env.FILENAME_PREFIX }}.ino
97-
--build-property "compiler.cpp.extra_flags=\"-DICM_20948_USE_DMP\""
98102

99103
- name: Rename binary
100104
run: |
376 Bytes
Binary file not shown.

Binaries/OpenLog_Artemis-V10-v25.bin

100644100755
368 Bytes
Binary file not shown.
Binary file not shown.

Binaries/OpenLog_Artemis-V10-v26.bin

386 KB
Binary file not shown.

Binaries/OpenLog_Artemis-X04-v26.bin

385 KB
Binary file not shown.

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,23 @@
11
Change Log
22
======================
33

4+
v2.6:
5+
---------
6+
7+
* Add workflow actions to automatically compile the firmware binaries
8+
* Add support for the LPS28DFW - thank you @gauteh #179 , resolves #177
9+
* Adds a Docker file for compiling the firmware - thank you @gauteh #179
10+
* Only disable I2C SDA and SCL during sleep when I2C bus is being powered down - thank you @whipple63 #167 , resolves #155
11+
* Add calibrationConcentration support for the SCD30 - thank you @hotstick #181
12+
* Add limited support for the VEML7700 light sensor - resolves #184
13+
* Adds much improved support for the NAU7802 scale
14+
* Negative weights can now be logged - resolves #176
15+
* The calibration mode can now be set to: None, Internal (default), or External
16+
* The sample rate, gain and LDO voltage can be selected via the menu
17+
* The scale can be zero'd and calibrated separately - there are separate menu entries for zero, calibrate and calibration weight entry
18+
* Corrects a major bug which prevented mutiple NAU7802, SCD30 or u-blox GNSS from being configured correctly when connected through a mux
19+
* Corrects a minor bug - corrected array size checking for olaftoa
20+
421
v2.5:
522
---------
623

COMPILE_BINARY.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ Copy and paste the following into an empty sketch. Click on each link in turn to
6969
// http://librarymanager/All#SparkFun_MMC5983MA
7070
// http://librarymanager/All#SparkFun_ADS1015
7171
// http://librarymanager/All#SparkFun_KX13X
72+
// http://librarymanager/All#SparkFun_LPS28DFW_Arduino_Library
73+
// http://librarymanager/All#SparkFun_VEML7700
7274
```
7375

7476
### Blue Robotics MS5837
@@ -107,6 +109,11 @@ Navigate to the `Extras` folder in the Zip file. Copy the `UartPower3.zip` file.
107109
C:\Users\<Your_User>\AppData\Local\Arduino15\packages\SparkFun\hardware\apollo3
108110
```
109111

112+
On Linux machines, this is (usually):
113+
```
114+
/home/<Your_User>/.arduino15/packages/SparkFun/hardware/apollo3/
115+
```
116+
110117
Unzip it (Extract All files)
111118

112119
**Close the Arduino IDE**

Dockerfile

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
FROM ubuntu:latest
2+
3+
ENV DEBIAN_FRONTEND=noninteractive
4+
5+
RUN apt-get update && apt-get install -y curl git unzip && apt-get clean
6+
7+
RUN curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR=/usr/local/bin sh
8+
9+
RUN arduino-cli config init
10+
11+
RUN arduino-cli config add board_manager.additional_urls https://raw.githubusercontent.com/sparkfun/Arduino_Apollo3/main/package_sparkfun_apollo3_index.json
12+
13+
RUN arduino-cli core update-index
14+
RUN arduino-cli core install "Sparkfun:[email protected]"
15+
16+
RUN arduino-cli lib update-index
17+
18+
# RUN arduino-cli lib install "SparkFun Qwiic Power Switch Arduino Library"
19+
RUN arduino-cli lib install "[email protected]"
20+
RUN arduino-cli lib install "SparkFun 9DoF IMU Breakout - ICM 20948 - Arduino Library"
21+
RUN arduino-cli lib install "SparkFun I2C Mux Arduino Library"
22+
RUN arduino-cli lib install "SparkFun CCS811 Arduino Library"
23+
RUN arduino-cli lib install "SparkFun VL53L1X 4m Laser Distance Sensor"
24+
RUN arduino-cli lib install "SparkFun BME280"
25+
RUN arduino-cli lib install "SparkFun LPS25HB Pressure Sensor Library"
26+
RUN arduino-cli lib install "SparkFun VEML6075 Arduino Library"
27+
RUN arduino-cli lib install "SparkFun PHT MS8607 Arduino Library"
28+
RUN arduino-cli lib install "SparkFun MCP9600 Thermocouple Library"
29+
RUN arduino-cli lib install "SparkFun SGP30 Arduino Library"
30+
RUN arduino-cli lib install "SparkFun VCNL4040 Proximity Sensor Library"
31+
RUN arduino-cli lib install "SparkFun MS5637 Barometric Pressure Library"
32+
RUN arduino-cli lib install "SparkFun High Precision Temperature Sensor TMP117 Qwiic"
33+
RUN arduino-cli lib install "SparkFun u-blox GNSS Arduino Library"
34+
RUN arduino-cli lib install "SparkFun 6DoF ISM330DHCX"
35+
RUN arduino-cli lib install "SparkFun Qwiic Scale NAU7802 Arduino Library"
36+
RUN arduino-cli lib install "SparkFun SCD30 Arduino Library"
37+
RUN arduino-cli lib install "SparkFun Qwiic Humidity AHT20"
38+
RUN arduino-cli lib install "SparkFun SHTC3 Humidity and Temperature Sensor Library"
39+
RUN arduino-cli lib install "SparkFun ADS122C04 ADC Arduino Library"
40+
RUN arduino-cli lib install "SparkFun MicroPressure Library"
41+
RUN arduino-cli lib install "SparkFun Particle Sensor Panasonic SN-GCJA5"
42+
RUN arduino-cli lib install "SparkFun SGP40 Arduino Library"
43+
RUN arduino-cli lib install "SparkFun Qwiic Button and Qwiic Switch Library"
44+
RUN arduino-cli lib install "SparkFun Bio Sensor Hub Library"
45+
RUN arduino-cli lib install "SparkFun MMC5983MA Magnetometer Arduino Library"
46+
RUN arduino-cli lib install "SparkFun ADS1015 Arduino Library"
47+
RUN arduino-cli lib install "SparkFun KX13X Arduino Library"
48+
RUN arduino-cli lib install "SparkFun SDP3x Arduino Library"
49+
RUN arduino-cli lib install "SparkFun LPS28DFW Arduino Library"
50+
RUN arduino-cli lib install "SparkFun VEML7700 Arduino Library"
51+
52+
# Add BlueRobotics_MS5837_Library from git
53+
WORKDIR /root/Arduino/libraries
54+
RUN curl -L https://github.com/bluerobotics/BlueRobotics_MS5837_Library/archive/refs/heads/master.zip -o ms5837.zip
55+
RUN unzip ms5837.zip
56+
57+
WORKDIR /work
58+
59+
ADD . .
60+
61+
# Patch Apollo Core
62+
WORKDIR /work/Extras
63+
RUN unzip UartPower3.zip
64+
RUN cp HardwareSerial.h /root/.arduino15/packages/SparkFun/hardware/apollo3/2.2.1/cores/arduino/mbed-bridge/core-extend/HardwareSerial.h
65+
RUN cp HardwareSerial.cpp /root/.arduino15/packages/SparkFun/hardware/apollo3/2.2.1/cores/arduino/mbed-bridge/core-implement/HardwareSerial.cpp
66+
RUN cp UnbufferedSerial.h /root/.arduino15/packages/SparkFun/hardware/apollo3/2.2.1/cores/mbed-os/drivers/UnbufferedSerial.h
67+
RUN cp serial_api.c /root/.arduino15/packages/SparkFun/hardware/apollo3/2.2.1/cores/mbed-os/targets/TARGET_Ambiq_Micro/TARGET_Apollo3/device/serial_api.c
68+
RUN cp libmbed-os.a /root/.arduino15/packages/SparkFun/hardware/apollo3/2.2.1/variants/SFE_ARTEMIS_ATP/mbed/libmbed-os.a
69+
70+
WORKDIR /root/.arduino15/packages/SparkFun/hardware/apollo3/2.2.1/libraries/SPI/src
71+
RUN patch -p1 < /work/Extras/spi.diff
72+
73+
# Enable DMP on ICM 20948
74+
RUN sed -i 's|//#define ICM|#define ICM|g' /root/Arduino/libraries/SparkFun_9DoF_IMU_Breakout_-_ICM_20948_-_Arduino_Library/src/util/ICM_20948_C.h
75+
76+
# Enable debug symbols
77+
# echo "compiler.c.extra_flags=-MMD -g3" >> /root/.arduino15/packages/SparkFun/hardware/apollo3/2.2.1/platform.local.txt
78+
# echo "compiler.cxx.extra_flags=-MMD -g3" >> /root/.arduino15/packages/SparkFun/hardware/apollo3/2.2.1/platform.local.txt
79+
80+
WORKDIR /work/Firmware/OpenLog_Artemis
81+
82+
CMD arduino-cli compile --build-cache-path /tmp/cache -v -e -b SparkFun:apollo3:sfe_artemis_atp

Extras/spi.diff

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
diff -u old/SPI.cpp new/SPI.cpp
2+
--- old/SPI.cpp 2023-09-14 12:53:54.000000000 +0200
3+
+++ new/SPI.cpp 2023-09-18 18:45:48.141504930 +0200
4+
@@ -86,6 +86,7 @@
5+
void arduino::MbedSPI::end() {
6+
if (dev) {
7+
delete dev;
8+
+ dev = NULL;
9+
}
10+
}
11+

Firmware/OpenLog_Artemis/OpenLog_Artemis.ino

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,16 @@
145145
Add Tony Whipple's PR #146 - thank you @whipple63
146146
Add support for the ISM330DHCX, MMC5983MA, KX134 and ADS1015
147147
Resolve issue #87
148+
149+
v2.6:
150+
Add support for the LPS28DFW - thank you @gauteh #179
151+
Only disable I2C SDA and SCL during sleep when I2C bus is being powered down - thank you @whipple63 #167
152+
Add calibrationConcentration support for the SCD30 - thank you @hotstick #181
153+
Add limited support for the VEML7700 light sensor
148154
*/
149155

150156
const int FIRMWARE_VERSION_MAJOR = 2;
151-
const int FIRMWARE_VERSION_MINOR = 5;
157+
const int FIRMWARE_VERSION_MINOR = 6;
152158

153159
//Define the OLA board identifier:
154160
// This is an int which is unique to this variant of the OLA and which allows us
@@ -158,7 +164,7 @@ const int FIRMWARE_VERSION_MINOR = 5;
158164
// the variant * 0x100 (OLA = 1; GNSS_LOGGER = 2; GEOPHONE_LOGGER = 3)
159165
// the major firmware version * 0x10
160166
// the minor firmware version
161-
#define OLA_IDENTIFIER 0x125 // Stored as 293 decimal in OLA_settings.txt
167+
#define OLA_IDENTIFIER 0x126 // Stored as 294 decimal in OLA_settings.txt
162168

163169
//#define noPowerLossProtection // Uncomment this line to disable the sleep-on-power-loss functionality
164170

@@ -318,6 +324,8 @@ icm_20948_DMP_data_t dmpData; // Global storage for the DMP data - extracted fro
318324
#include "SparkFun_MMC5983MA_Arduino_Library.h" //Click here to get the library: http://librarymanager/All#SparkFun_MMC5983MA
319325
#include "SparkFun_ADS1015_Arduino_Library.h" //Click here to get the library: http://librarymanager/All#SparkFun_ADS1015
320326
#include "SparkFun_KX13X.h" //Click here to get the library: http://librarymanager/All#SparkFun_KX13X
327+
#include "SparkFun_LPS28DFW_Arduino_Library.h" //Click here to get the library: http://librarymanager/All#SparkFun_LPS28DFW_Arduino_Library
328+
#include "SparkFun_VEML7700_Arduino_Library.h" // Click here to get the library: http://librarymanager/All#SparkFun_VEML7700
321329

322330
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
323331

@@ -468,6 +476,10 @@ void setup() {
468476

469477
SerialPrintf3("Artemis OpenLog v%d.%d\r\n", FIRMWARE_VERSION_MAJOR, FIRMWARE_VERSION_MINOR);
470478

479+
#ifdef noPowerLossProtection
480+
SerialPrintln(F("** No Power Loss Protection **"));
481+
#endif
482+
471483
if (settings.useGPIO32ForStopLogging == true)
472484
{
473485
SerialPrintln(F("Stop Logging is enabled. Pull GPIO pin 32 to GND to stop logging."));

0 commit comments

Comments
 (0)