Skip to content

Commit c40ee68

Browse files
committed
Adjust temperature offset value for WiFi mode
1 parent b952ef2 commit c40ee68

File tree

2 files changed

+57
-3
lines changed

2 files changed

+57
-3
lines changed

.github/workflows/arduino_build.yml

Lines changed: 56 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ jobs:
1010
- name: Check out repository
1111
uses: actions/checkout@v2
1212

13-
- uses: arduino/compile-sketches@v1
13+
- name: Compile sketch
14+
uses: arduino/compile-sketches@v1
1415
with:
1516
fqbn: "esp32:esp32:esp32s2"
1617
platforms: |
@@ -25,4 +26,57 @@ jobs:
2526
- name: esp32-waveshare-epd
2627
source-path: ./esp32-waveshare-epd
2728
sketch-paths: |
28-
- .
29+
- .
30+
cli-compile-flags: |
31+
--output-dir build
32+
33+
- name: Create FIRMWARE.BIN
34+
shell: bash
35+
run: |
36+
set -euo pipefail
37+
38+
if [[ ! -d build ]]; then
39+
echo "ERROR: build/ directory not found."
40+
echo "Workspace directories:"
41+
find . -maxdepth 3 -type d -print
42+
exit 1
43+
fi
44+
45+
echo "Build outputs:"
46+
find build -type f -maxdepth 3 -print
47+
48+
# Pick the main application bin:
49+
# - exclude bootloader/partitions/ota data
50+
# - choose the largest remaining .bin (typically the app firmware)
51+
BIN="$(
52+
find build -type f -name '*.bin' \
53+
! -name '*bootloader*' \
54+
! -name '*partitions*' \
55+
! -name '*ota_data_initial*' \
56+
-printf '%s %p\n' \
57+
| sort -nr \
58+
| head -n 1 \
59+
| awk '{print $2}'
60+
)"
61+
62+
if [[ -z "${BIN:-}" || ! -f "$BIN" ]]; then
63+
echo "ERROR: Could not identify firmware .bin in build/"
64+
echo "All .bin files found:"
65+
find build -type f -name '*.bin' -print
66+
exit 1
67+
fi
68+
69+
echo "Selected firmware bin: $BIN"
70+
cp "$BIN" FIRMWARE.BIN
71+
72+
- name: Upload firmware artifact
73+
uses: actions/upload-artifact@v4
74+
with:
75+
name: firmware
76+
path: FIRMWARE.BIN
77+
78+
- name: Upload full build outputs (optional)
79+
uses: actions/upload-artifact@v4
80+
with:
81+
name: build-outputs
82+
path: build/

OpenCO2_Sensor.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ void loadCredentials() {
317317

318318
float getTempOffset() {
319319
if (!BatteryMode) {
320-
if (useWiFi) return 12.2;
320+
if (useWiFi) return 11.0;
321321
return 4.4;
322322
} else {
323323
return 0.0; // was with periodic measurment 0.8

0 commit comments

Comments
 (0)