Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API V2 - I2C Review #693

Open
wants to merge 313 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
313 commits
Select commit Hold shift + click to select a range
1007802
🚧 WIP, digitalio - Fix linker error, refactor get pin to get pin idx,…
brentru Sep 10, 2024
1a6fc3d
🚧 WIP, digitalio - blink demo
brentru Sep 10, 2024
c29f210
🚧 WIP, digitalio: Add input, input pullup to ConfigurePin
brentru Sep 10, 2024
1363329
🚧 WIP, digitalio - Refactor ConfigurePin, AddDigitalPin
brentru Sep 10, 2024
60fb5f6
refactor adddigitalpin() call
brentru Sep 10, 2024
3ac8472
🚧 WIP, digitalio: Add Update() service for reading pins
brentru Sep 10, 2024
10a19bf
🚧 WIP, digitalio - Add encoder for digital io event to model, encode/…
brentru Sep 11, 2024
434107c
🚧 WIP, digitalio - Refactor out the Update() conditional function cal…
brentru Sep 11, 2024
5288af0
🚧 WIP, digtialio: adhere to period better, fix bug
brentru Sep 11, 2024
a3386d3
🚧 WIP, digitalio - publishing to broker missing value
brentru Sep 11, 2024
3093b50
looking at flash failure
brentru Sep 24, 2024
1b2c10b
continue fix flash failure
brentru Sep 24, 2024
d872814
🚑️ Fix Filesystem bug in V2
brentru Sep 25, 2024
50609f7
🎨 Improve structure of the FS code
brentru Sep 25, 2024
fcc6914
🚧 WIP, digitalio - Sends boolean value from timer-based input
brentru Sep 25, 2024
0675abc
🚧 WIP, digitalio - Refactoring in update()
brentru Sep 26, 2024
70406f3
🚧 WIP, digitalio - Add doxygen comments
brentru Sep 26, 2024
624ba3d
🚧 WIP, digitalio - refactoring
brentru Sep 26, 2024
e513533
🚧 WIP, digitalio - Address TODO for statusled
brentru Sep 27, 2024
ce7d5ed
🎨 Add doxygen across new v2 classes
brentru Sep 27, 2024
47dcb93
🎨 Doxygen sensor model, ws_manager classes
brentru Sep 27, 2024
fbaadb9
🎨 Doxygen pass complete
brentru Sep 27, 2024
4a2ccac
🚧 WIP, digitalio - Implement remove pin API
brentru Sep 30, 2024
e42e963
🚧 WIP, digitalio - Attach dio remove to b2d cb
brentru Sep 30, 2024
3cc50de
🚧 WIP, digitalio - refactor naming to match python
brentru Sep 30, 2024
c20e45b
rm unused model func
brentru Sep 30, 2024
49e110d
🚧 WIP, analogio - Create controller, hardware, model and hooks for An…
brentru Oct 1, 2024
6b93efc
⬆️ Upgrade protobuf to match ee1df09fb542fd9ba27271cfa5aebc75bd9842a3
brentru Oct 1, 2024
b9f7c12
⬆️ Upgrade protos, 7dd0fe6
brentru Oct 1, 2024
4ca038c
🚧 WIP, analogio - Fix compiler errors and build pass
brentru Oct 1, 2024
fcd87d1
🚧 WIP, analogio - Add deinit, scale reads, update
brentru Oct 1, 2024
eb6bf12
🚧 WIP, analogio - Read voltage, precalculate scale factor for optimiz…
brentru Oct 2, 2024
e5e2724
🎨 WIP, analogio - Encode, publish voltage event
brentru Oct 2, 2024
fac050e
🚧 WIP, analogio - Add encoder for a raw analogio event
brentru Oct 2, 2024
e5d3199
🚧 WIP, analogio - refactor encode/publish in controller, refactor model
brentru Oct 2, 2024
6a82e77
🚧 WIP, analogio - publish out
brentru Oct 2, 2024
067c220
🎨 WIP, analogio - Doxygen analogio classes
brentru Oct 3, 2024
549874a
🐛 WIP, analogio - bring in
brentru Oct 3, 2024
e30d4e4
🐛 WIP, analogio - Bug fixes during testing
brentru Oct 3, 2024
7f2d550
🐛 WIP, analogio - Refactor hardware.cpp for raw adc reads, fix underf…
brentru Oct 4, 2024
706652f
add partitions, use larger parition size
brentru Oct 4, 2024
a9288cc
🚧 WIP, dsx - Sketch out ds18x20 classes
brentru Oct 7, 2024
e342564
🚧 WIP, dsx - Plumbing for ds18x in App, switch to OneWireNG interface
brentru Oct 7, 2024
307fd43
implement setup for dsx, remove deps that conflict
brentru Oct 8, 2024
b8377e5
🚧 WIP, dsx - added message
brentru Oct 8, 2024
d207447
🚧 WIP, analogio - publish out to the broker
brentru Oct 8, 2024
312c8f6
🚧 WIP, dsx - Add read and sensor id funcs
brentru Oct 8, 2024
f4184e5
🚧 WIP, dsx - Implement readF, getters
brentru Oct 8, 2024
b424c79
🚧 WIP, dsx - Add to hardware, updat eloop
brentru Oct 9, 2024
540b116
🚧 WIP, dsx - Attempt towards encoding multiple sensor events in one u…
brentru Oct 10, 2024
72f5a3f
🚧 Remove the onewire bus from the pin and vec erase
brentru Oct 10, 2024
697b6e9
🎨 WIP, dsx - Doxygen and remove unused code implemented in the sensor…
brentru Oct 10, 2024
458e7a6
🚧 WIP, dsx - Read temperature and properly reset all counters
brentru Oct 15, 2024
16412d4
🚧 WIP, dsx, handle event/remove
brentru Oct 15, 2024
a5e43c1
add logging facility for dsx
brentru Oct 15, 2024
8e5a4de
🚧 WIP, dsx - Add debug profile, remove redundant code within update()…
brentru Oct 17, 2024
5468207
🐛 WIP, dsx - Fix bug where two sensors are initd but only the first i…
brentru Oct 17, 2024
6d4e85d
🐛 Fix DSx bug, onewirePin not added to ds18x20Evetn messages
brentru Oct 17, 2024
407b1e4
🐛 Don't allow non-object-temp SensorTypes to init a ds18 sensor
brentru Oct 17, 2024
c1efd3e
📝 Review controller/hardware classes, self-review
brentru Oct 17, 2024
54edb4c
🎨 Review dsx model
brentru Oct 18, 2024
65b66fe
🚧 SD - include sd cs pins for all boards
brentru Oct 28, 2024
24561bc
🚧 SD - entry point and detect if inserted in all boards
brentru Oct 28, 2024
26ff4ff
🚧 SD - Add global flag for sd mode, detection in connect and entry po…
brentru Oct 28, 2024
46d85c0
🚧 SD - parsing hooks for arduinojson
brentru Oct 29, 2024
baca82d
🚧 Integrate Wokwi CLI and simulator builds, begin
brentru Oct 30, 2024
f22b431
🚧 Wokwi progress
brentru Oct 30, 2024
fbf9886
🚧 Working simulation with Wokwi
brentru Oct 30, 2024
00530c1
🚧 SD - refactor out sd func. to a new class
brentru Oct 31, 2024
eaa1ee8
🚀 SD - wokwi simulator detecting and switching to offline mode
brentru Oct 31, 2024
3b3a10c
🚧 SD - add waitForIncomingConfigFile() parse serial over TCP
brentru Nov 1, 2024
30bab50
🚧 SD - parse out component type, add offline/debug flag, parse json s…
brentru Nov 1, 2024
6bb1ab2
🚧 SD - Start building out json->pb parser, allow debug passthru for p…
brentru Nov 4, 2024
fbd4c5b
🚧 SD - Add parsing for AnalogIOAdd, remove DigitalIOAdd global messag…
brentru Nov 4, 2024
1aeee68
🎨 SD - Add formatting logging
brentru Nov 4, 2024
ad574e2
🚧 SD - parsing to dispatch working for one component only
brentru Nov 5, 2024
aa99b19
add rtc
brentru Nov 5, 2024
cdcbb65
🚧 SD - prioritizeds1307 rtc over ds3231
brentru Nov 5, 2024
0f226a6
switch from func to property to test online mode
brentru Nov 5, 2024
1b5ee96
🚧 SD - hardcode the checkin process
brentru Nov 5, 2024
019c7a9
✨ [SD] Add PCF8253 RTC compatibility
brentru Nov 7, 2024
9f6c810
✨ [SD] Log jsonl to serial
brentru Nov 7, 2024
861ab98
[SD] implement checkin process dynamic instead of hardcode
brentru Nov 7, 2024
b71e2e6
[SD] 2x component json add
brentru Nov 8, 2024
d4c8dad
[SD] Add vector of vectors for processing > 1 component from JSON, pr…
brentru Nov 12, 2024
7020f4e
[SD] Implement DigitalIO Output parsing, untested
brentru Nov 12, 2024
4d7d1db
[SD] Get codebase show-ready
brentru Nov 13, 2024
bf7b7de
[SD] Implement DS18x20 JSON->PB parsing, decoding at the component-ha…
brentru Nov 14, 2024
f0f574a
[SD] ds18x20 decode thru controller via HandleAdd OK
brentru Nov 14, 2024
27aa7d4
[SD] Multiple DS18b20 events, multiple ds18b20 instances
brentru Nov 18, 2024
5b5463c
[SD] Refactor diagram, doxygen sd class
brentru Nov 18, 2024
d97e430
[SD] Add offline analog input scenario
brentru Nov 19, 2024
3eac221
[SD] Rm sd read json scenario that we aren't using
brentru Nov 19, 2024
7eab682
[SD] Add test for offline digital input
brentru Nov 19, 2024
b2c79f3
[SD] Add test for parsing invalid json edge case
brentru Nov 19, 2024
1d43de2
[SD] Add Pytest file, rename to scenario yaml
brentru Nov 19, 2024
4826b58
[SD] Add binary for offline
brentru Nov 20, 2024
ccb13b1
[SD] Run via GH:A
brentru Nov 20, 2024
6e6ad43
[SD] Fix path
brentru Nov 20, 2024
c6776a2
update tests, result ignore
brentru Nov 20, 2024
01d4b72
Merge pull request #647 from tyeth/add-metro-s3
brentru Oct 24, 2024
192ff1a
merge in upstream esp32s3 metro patch
brentru Nov 21, 2024
8eea7ec
looking at metro s3
brentru Nov 21, 2024
26c62ab
putback main way to attach msc
brentru Nov 21, 2024
3483345
[SD] Refactoring ParseFile1
brentru Nov 22, 2024
ebb269c
[SD] Refactoring ParseFile2
brentru Nov 22, 2024
a81fa03
[SD] Push #offline config into the PIO build ini for one platform only
brentru Nov 25, 2024
4794bcd
[SD] Refactor all parsing
brentru Nov 26, 2024
c9c904c
[SD] Fully refactor ParseConfigFile
brentru Nov 26, 2024
0e0cda4
[SD] Parsing and dispatch working on Metro ESP32S3 hardware
brentru Nov 26, 2024
52a8bd7
[SD] Implement buffered JSON stream writes to sd card, refactoring al…
brentru Nov 27, 2024
4d9bed8
[SD] Refactor sd header and clean it up
brentru Nov 29, 2024
e795301
[SD] Refactor out LogSensorEventTOSD funcs
brentru Nov 29, 2024
c2ea367
[SD] Handle error cases during parsing for DIOAdd
brentru Dec 2, 2024
7207778
[SD] All tests green again
brentru Dec 3, 2024
cd720e5
[SD] first working offline log to sd
brentru Dec 3, 2024
8bac2d7
[SD] Add some overhead for pico2, generate json checksum data script
brentru Dec 5, 2024
45d2365
[SD] Refactor checksum validation out, dont require it to operate
brentru Dec 6, 2024
c2a2e42
[SD] Refactor and make pins dynaically allocated for sdcard
brentru Dec 6, 2024
4a6364e
[SD] dynamic pin refactor 2
brentru Dec 9, 2024
2d7139c
[SD] Link tinyusb, refactor init
brentru Dec 9, 2024
0a29dc7
[SD] Finish refactoring to allow config.json to sit on WIPPER drive, …
brentru Dec 9, 2024
33d5089
clean up
brentru Dec 9, 2024
d1ac920
[SD] Address error cases/states for sd_cs handling
brentru Dec 10, 2024
b7415d0
[SD] Handle sd cards of varying capacities!
brentru Dec 10, 2024
e076710
[SD] Set status led green after successful config
brentru Dec 10, 2024
d29e3e4
[SD] Start to support pico2
brentru Dec 11, 2024
0d96330
[SD] add pico2
brentru Dec 12, 2024
a7c20d1
rm old terms
brentru Dec 12, 2024
c673180
[SD] Move to ws_adapters naming scheme to allow flexibility for offli…
brentru Dec 12, 2024
e3e6ff3
[SD] Complete adapters/ work and build
brentru Dec 13, 2024
126f430
[SD] Add debug output to adapter classes, valid return values where a…
brentru Dec 13, 2024
253a2c0
[SD] Support for LittleFS based provisioning
brentru Dec 16, 2024
1fd4328
[SD] Untested on HW | Fix for ESP32 SPI clock issue
brentru Dec 19, 2024
f10f755
[SD] Tested with ESP32 Pico QT Py and DS3231
brentru Dec 20, 2024
75b117b
[SD] Fix Wokwi Testing, test_digital_input is having issues still
brentru Dec 26, 2024
a2bcc7d
[SD] Resolve all Wokwi test issues, all green
brentru Dec 27, 2024
6ecacfd
[SD] Bring bcd script in-line with main
brentru Dec 27, 2024
5b67a61
✨ Introduce new I2c API
brentru Jan 2, 2025
450a369
plumb deviceaddreplace more
brentru Jan 9, 2025
71b06ec
more plumbing for i2c
brentru Jan 10, 2025
17e5c4e
implement first pass at Handle_I2cDeviceAddOrReplace
brentru Jan 13, 2025
fafd25f
add driver_v2 base class
brentru Jan 14, 2025
a507f77
refactoring!
brentru Jan 14, 2025
b2770ee
refactoring more!
brentru Jan 14, 2025
bdcf514
Implement API for I2cDeviceAddedorReplaced message
brentru Jan 15, 2025
4d2f446
Publish back the wippersnapper_i2c_I2cDeviceAddedOrReplaced message t…
brentru Jan 15, 2025
321c011
Refactor further, add bme280 driver, compile OK
brentru Jan 16, 2025
88c7df2
Init i2c component from sd card config file
brentru Jan 17, 2025
100f343
Add driver, initial framework and comments for i2c muxes
brentru Jan 17, 2025
37eec43
Add initial mux working
brentru Jan 21, 2025
75a58a6
Reflect WipperSnapper_Protobuf 10060314ca8f3e2d4f7f21de96e7521c58655a22
brentru Jan 21, 2025
6c96a60
Refactor out publishing, i2c mux init code!
brentru Jan 22, 2025
970bf4c
Match WipperSnapper_Protobuf bed8b12f6f5faec6c5604e204b44a8528e35607a
brentru Jan 22, 2025
0d6fb0d
Update with alt. i2c bus plumbing
brentru Jan 23, 2025
383a69e
Fix logic within IsBusStatusOK and add alt. bus to create driver func
brentru Jan 23, 2025
5d8e992
working on hardware
brentru Jan 23, 2025
a0b2729
Refactor out SD parsing for I2C
brentru Jan 24, 2025
e20d50f
Park Remove for now, dont implement just yet
brentru Jan 24, 2025
1e3f6af
Update drvBase to use ulong() for all time-keeping rather than long, …
brentru Jan 28, 2025
cc2d25e
Tyeth review
brentru Jan 28, 2025
179cc52
MUX refactor
brentru Jan 28, 2025
05ce076
setbool
brentru Jan 28, 2025
af1ac3b
Allow controller to query driver obj. for if its using an alt. i2c bu…
brentru Jan 30, 2025
3a82a14
Map of lambda funcs for GetEventX() calls
brentru Jan 30, 2025
5c990e4
pull data out of sensor into an event variable
brentru Jan 30, 2025
2220b7f
refactor mux handling, doxygen
brentru Jan 31, 2025
f0f0855
Log the output to serial and sd
brentru Feb 3, 2025
7fe8d61
Fix bug with mux addr printing, non-default scl/sda pins for alt. bus…
brentru Feb 4, 2025
79f4f38
Expose scl/sda pins through the driver for an alt. i2c bus rather tha…
brentru Feb 4, 2025
e384ad6
Add ADT7410 drv
brentru Feb 4, 2025
1eee911
Add AHTx0
brentru Feb 4, 2025
7f8477e
Add bh1750, bme680, bmp280, bmp3xx variants
brentru Feb 4, 2025
9099c02
add ens160, htu21d, hts221, ina219
brentru Feb 4, 2025
dc57830
add lc709203f, lps22gb, lps25hb, lps3xhw
brentru Feb 4, 2025
ee7a0f4
add ltr329, ltr303, ltr390, max1704x, mcp3421
brentru Feb 4, 2025
dde9120
add mcp9808
brentru Feb 4, 2025
b311855
add Mpl115a2
brentru Feb 4, 2025
7b0faca
Add MPRLS, Ms8607, nau7802, pct2075, fix inclusion error for MPRLS an…
brentru Feb 5, 2025
180d48e
Add PM25, SCD30, SCD4x
brentru Feb 6, 2025
e13ea8f
add sen5x, sgp40, sht3x, sht4x, shtc3, si7021, stemmasoil, tmp117, ts…
brentru Feb 6, 2025
c0786ff
add veml, vl53x, vl61x
brentru Feb 6, 2025
170cc42
compile w/o cruft
brentru Feb 6, 2025
c851045
remove second pb.h file?! switch to hashmap
brentru Feb 6, 2025
00006b4
moving towards v2 api only?
brentru Feb 6, 2025
e659e11
remove the api switcher
brentru Feb 6, 2025
bdfb73f
v2->no suffix
brentru Feb 7, 2025
ec5bcb1
remove debugs, add kat blink for offline
brentru Feb 7, 2025
92a1af6
Fix bug with initial log file, fix status LED color issue
brentru Feb 7, 2025
d4eb3a9
Remove unsorted map, possible collisons
brentru Feb 7, 2025
692f56f
Full mapping for all values!
brentru Feb 7, 2025
aa8ef67
Fix get->GetEvent() bug!
brentru Feb 7, 2025
bb31f5e
Fix getAmbientTempF(), get raw event for AHT20 test
brentru Feb 10, 2025
b78c359
Fix light sensor not recording to event for TSL2591
brentru Feb 10, 2025
67ecbe6
QoL for hanging the device for driver failure, allow picow via offlin…
brentru Feb 10, 2025
080d1da
Fix for SCD40, SCD41
brentru Feb 10, 2025
b86d9c2
Doxygen Pass 1/2
brentru Feb 11, 2025
8cd12df
Doxygen Pass 2/?
brentru Feb 11, 2025
8506c17
attempt fix sd for pico target
brentru Feb 11, 2025
c95047d
Fix SD card file handling for Pico target, overall fix
brentru Feb 11, 2025
560d707
Fix DPS, scd, memset issue
brentru Feb 11, 2025
c362d0b
complete doxygen pass through
brentru Feb 11, 2025
55c6b53
Bring over SD card review changes
brentru Feb 11, 2025
31533af
Add CI for offline mode
brentru Feb 12, 2025
340e3f8
Add offline skip/generate files
brentru Feb 12, 2025
71aa594
Refactor haltdelay to let it hang or reboot
brentru Feb 13, 2025
a756f0f
Refactor mux handling within handleI2cDeviceAddOrReplace
brentru Feb 13, 2025
a27bd94
Refactor mux init, driver init
brentru Feb 13, 2025
e566898
Fix mux init from refactor
brentru Feb 13, 2025
0542219
Review model.cpp
brentru Feb 13, 2025
7bf0896
Update release for offline mode ci
brentru Feb 13, 2025
36f1b04
Remove conditionals for relase, for now
brentru Feb 13, 2025
ae086bd
Fix skip/gen files
brentru Feb 13, 2025
33f3533
Fix include case sensitivity issue
brentru Feb 13, 2025
0095816
Fix BME280 uCase
brentru Feb 13, 2025
7558d32
fix case sensitivty again
brentru Feb 13, 2025
b8c98f2
fix redefiniton for Wippersnapper.h within driver
brentru Feb 13, 2025
b6928ba
sensiron changed their case sensitivity?
brentru Feb 13, 2025
15ad1f4
add RTCLib
brentru Feb 13, 2025
c35cc76
skipfiles for rp20xx
brentru Feb 13, 2025
c937e93
add streamutils
brentru Feb 13, 2025
9b43229
fix generate/skip
brentru Feb 13, 2025
bc1902e
manual scd4x branch
brentru Feb 13, 2025
5150c9b
Match `main` branch for 1.0.0 release of scd4x lib
brentru Feb 13, 2025
6c84b7a
Rm manual scd4x lib clone
brentru Feb 13, 2025
9dcd5f0
typo, v2 api uses _address
brentru Feb 13, 2025
435bac2
status neopixel num = 1
brentru Feb 13, 2025
fc10a78
add pico board
brentru Feb 18, 2025
0344da5
fix mv
brentru Feb 18, 2025
5f78c96
fix rename
brentru Feb 18, 2025
1d12fa7
tree clang
brentru Feb 18, 2025
1d2d97c
checkout 2x?
brentru Feb 18, 2025
670a6dc
do not clang inside protos/ dir, new dir replaces wippersnapper/ dir
brentru Feb 18, 2025
77bbf1a
run clang first
brentru Feb 18, 2025
af886db
clang, fix offline test runner to install
brentru Feb 18, 2025
2770d8a
bring in test runner, attempt to run!
brentru Feb 18, 2025
f206963
clang again
brentru Feb 18, 2025
61de287
clangx2
brentru Feb 18, 2025
33f5955
target esp32dev install only
brentru Feb 18, 2025
8e7385c
tests use the runner
brentru Feb 18, 2025
cec28b1
Pass tests
brentru Feb 19, 2025
357a73c
consolidate tests and build script
brentru Feb 19, 2025
d0b42ad
bump download-artifact version to 4
brentru Feb 19, 2025
6485e4d
Work without a RTC attached
brentru Feb 24, 2025
9c3d525
Remove unused ctor in drvBase, remove code in ctor body for drvers
brentru Feb 24, 2025
0d96f93
Add workflow for this branch
brentru Feb 24, 2025
afffa81
remove .cpp residual
brentru Feb 24, 2025
8aa233a
Modify demos
brentru Feb 24, 2025
a2e722c
attribute scott perkins correctly
brentru Feb 24, 2025
5ac35f3
build while testing instead
brentru Feb 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
493 changes: 424 additions & 69 deletions .github/workflows/build-clang-doxy.yml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .github/workflows/release-callee.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: Brent Rubell for Adafruit Industries, 2022
# SPDX-FileCopyrightText: Brent Rubell for Adafruit Industries, 2022-2024
#
# SPDX-License-Identifier: MIT
name: WipperSnapper Release Callee
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-caller.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: Brent Rubell for Adafruit Industries, 2022
# SPDX-FileCopyrightText: Brent Rubell for Adafruit Industries, 2022 - 2024
#
# SPDX-License-Identifier: MIT
name: WipperSnapper Release Workflow
Expand Down
276 changes: 276 additions & 0 deletions .github/workflows/release-offline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,276 @@
# SPDX-FileCopyrightText: Brent Rubell for Adafruit Industries, 2025
#
# SPDX-License-Identifier: MIT
name: WipperSnapper Release Workflow for "Offline Mode" Alpha Feature
on:
push:
branches:
- migrate-api-v2
secrets:
GH_REPO_TOKEN:
required: true

jobs:
clang:
name: 🔎 Clang
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v5
with:
python-version: "3.x"
- uses: actions/checkout@v4

- uses: actions/checkout@v4
with:
repository: adafruit/ci-arduino
ref: ci-wippersnapper
path: ci
- name: pre-install
run: bash ci/actions_install.sh
- name: clang
run: python3 ci/run-clang-format.py -r -e "ci/*" -e "bin/*" -e src/nanopb -e src/protos -e src/pb.h -e src/provisioning/tinyusb src/

test-offline-mode:
name: 🧪 Test Offline Mode
runs-on: ubuntu-latest
needs: clang
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -r tests/requirements.txt
- name: Install Wokwi CI Server
uses: wokwi/wokwi-ci-server-action@v1
- name: Install Wokwi CLI
run: curl -L https://wokwi.com/ci/install.sh | sh
- name: Install PIO Libraries for esp32dev target
run: pio pkg install --environment=esp32dev
- name: Build PlatformIO Project
run: platformio run --environment esp32dev
- name: Move new build file to test folder
run: cp .pio/build/esp32dev/firmware.elf tests/bin/offline/firmware.elf
- name: Run Wokwi Tests
run: pytest tests/test_offline.py --junitxml=report.xml -v
env:
WOKWI_CLI_TOKEN: ${{ secrets.WOKWI_CLI_TOKEN }}
- name: Publish Wokwi Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
files: |
/home/runner/work/Adafruit_Wippersnapper_Arduino/Adafruit_Wippersnapper_Arduino/report.xml

build-esp32sx:
name: 🏗️ ESP32-Sx
runs-on: ubuntu-latest
needs: [clang]
strategy:
fail-fast: false
matrix:
arduino-platform:
[
"metroesp32s2",
"metro_esp32s3",
"feather_esp32s2",
"feather_esp32s2_tft",
"feather_esp32s2_reverse_tft",
"feather_esp32s3",
"feather_esp32s3_4mbflash_2mbpsram",
"feather_esp32s3_tft",
"qtpy_esp32s3",
"qtpy_esp32s2",
"feather_esp32s3_reverse_tft",
"qtpy_esp32s3_n4r2",
]
steps:
- uses: actions/setup-python@v5
with:
python-version: "3.x"
- uses: actions/checkout@v4
- name: Get WipperSnapper version
run: |
git fetch --prune --unshallow --tags
git describe --dirty --tags
echo >>$GITHUB_ENV WS_VERSION=$(git describe --dirty --tags)
- uses: actions/checkout@v4
with:
repository: adafruit/ci-arduino
ref: ci-wippersnapper
path: ci
- name: Install CI-Arduino
run: bash ci/actions_install.sh
- name: Install extra Arduino libraries
run: |
git clone --quiet https://github.com/milesburton/Arduino-Temperature-Control-Library.git /home/runner/Arduino/libraries/Arduino-Temperature-Control-Library
git clone --quiet https://github.com/pstolarz/OneWireNg.git /home/runner/Arduino/libraries/OneWireNg
git clone --quiet https://github.com/adafruit/Adafruit_HX8357_Library.git /home/runner/Arduino/libraries/Adafruit_HX8357_Library
git clone --quiet https://github.com/adafruit/Adafruit_ILI9341.git /home/runner/Arduino/libraries/Adafruit_ILI9341
git clone --quiet https://github.com/adafruit/Adafruit_STMPE610.git /home/runner/Arduino/libraries/Adafruit_STMPE610
git clone --quiet https://github.com/adafruit/Adafruit-ST7735-Library.git /home/runner/Arduino/libraries/Adafruit-ST7735-Library
git clone --quiet https://github.com/adafruit/Adafruit_TouchScreen.git /home/runner/Arduino/libraries/Adafruit_TouchScreen
git clone --quiet https://github.com/adafruit/Adafruit_TinyUSB_Arduino /home/runner/Arduino/libraries/Adafruit_TinyUSB_Arduino
git clone --depth 1 --branch wippersnapper https://github.com/brentru/lvgl.git /home/runner/Arduino/libraries/lvgl
git clone --depth 1 --branch development https://github.com/brentru/Adafruit_LvGL_Glue.git /home/runner/Arduino/libraries/Adafruit_LittlevGL_Glue_Library
- name: Download stable Nanopb
id: download-nanopb
continue-on-error: true
run: |
wget https://jpa.kapsi.fi/nanopb/download/nanopb-0.4.8.tar.gz
- if: ${{ failure() || steps.download-nanopb.outcome != 'success' }}
name: Restore cached nanopb
id: cache-nanopb-restore
uses: actions/cache/restore@v4
env:
cache-name: cache-node-modules
with:
path: ./nanopb-0.4.8.tar.gz
key: nanopb-0.4.8.tar.gz
- if: ${{ steps.download-nanopb.outcome == 'success' }}
name: Save nanopb to cache
id: cache-nanopb-save
uses: actions/cache/save@v4
env:
cache-name: cache-node-modules
with:
path: ./nanopb-0.4.8.tar.gz
key: nanopb-0.4.8.tar.gz
- name: Install stable Nanopb
run: |
tar -xf nanopb-0.4.8.tar.gz
# Copy files to WipperSnapper's src/nanopb directory
cp nanopb/pb_common.* nanopb/pb_encode.* nanopb/pb_decode.* src/nanopb
mv nanopb/pb.h src/nanopb/nanopb.pb.h
- name: List all files in Adafruit_LittlevGL_Glue_Library folder
run: |
ls /home/runner/Arduino/libraries/Adafruit_LittlevGL_Glue_Library
- name: Copy lv_conf.h file in Adafruit_LittlevGL_Glue_Library to the arduino library folder
run: |
cp /home/runner/Arduino/libraries/Adafruit_LittlevGL_Glue_Library/lv_conf.h /home/runner/Arduino/libraries
- name: Build for ESP32-SX
run: |
python3 ci/build_platform.py ${{ matrix.arduino-platform }} --build_timeout 48000
- name: list files (tree)
run: |
tree
- name: Rename build artifacts to reflect the platform name
run: |
mv examples/*/build/*/Wippersnapper_demo.ino.uf2 wippersnapper.${{ matrix.arduino-platform }}.${{ env.WS_VERSION }}.uf2
mv examples/*/build/*/Wippersnapper_demo.ino.bin wippersnapper.${{ matrix.arduino-platform }}.${{ env.WS_VERSION }}.bin
- name: upload build artifacts
uses: actions/upload-artifact@v4
with:
name: build-files-${{ matrix.arduino-platform }}.${{ env.WS_VERSION }}
path: |
wippersnapper.${{ matrix.arduino-platform }}.${{ env.WS_VERSION }}.uf2
wippersnapper.${{ matrix.arduino-platform }}.${{ env.WS_VERSION }}.bin

build-rp2040:
name: 🏗️ RP2040, RP2350
runs-on: ubuntu-latest
needs: [clang]
strategy:
fail-fast: false
matrix:
arduino-platform: ["pico_rp2040_tinyusb", "pico_rp2350_tinyusb"]
steps:
- uses: actions/setup-python@v5
with:
python-version: "3.x"
- uses: actions/checkout@v4
- name: Get WipperSnapper version
run: |
git fetch --prune --unshallow --tags
git describe --dirty --tags
echo >>$GITHUB_ENV WS_VERSION=$(git describe --dirty --tags)
- uses: actions/checkout@v4
with:
repository: adafruit/ci-arduino
ref: ci-wippersnapper
path: ci
- name: Install CI-Arduino
run: bash ci/actions_install.sh
# manually install OneWireNG/TempControlLib for OneWireNg (RP2040 Supported OneWire w/backwards compat.)
- name: Install extra Arduino libraries
run: |
git clone --quiet https://github.com/pstolarz/OneWireNg.git /home/runner/Arduino/libraries/OneWireNg
git clone --quiet https://github.com/pstolarz/Arduino-Temperature-Control-Library.git /home/runner/Arduino/libraries/Arduino-Temperature-Control-Library
git clone --quiet https://github.com/adafruit/Adafruit_TinyUSB_Arduino /home/runner/Arduino/libraries/Adafruit_TinyUSB_Arduino
- name: Download stable Nanopb
id: download-nanopb
continue-on-error: true
run: |
wget https://jpa.kapsi.fi/nanopb/download/nanopb-0.4.8.tar.gz
- if: ${{ failure() || steps.download-nanopb.outcome != 'success' }}
name: Restore cached nanopb
id: cache-nanopb-restore
uses: actions/cache/restore@v4
env:
cache-name: cache-node-modules
with:
path: ./nanopb-0.4.8.tar.gz
key: nanopb-0.4.8.tar.gz
- if: ${{ steps.download-nanopb.outcome == 'success' }}
name: Save nanopb to cache
id: cache-nanopb-save
uses: actions/cache/save@v4
env:
cache-name: cache-node-modules
with:
path: ./nanopb-0.4.8.tar.gz
key: nanopb-0.4.8.tar.gz
- name: Install stable Nanopb
run: |
tar -xf nanopb-0.4.8.tar.gz
# Copy files to WipperSnapper's src/nanopb directory
cp nanopb/pb_common.* nanopb/pb_encode.* nanopb/pb_decode.* src/nanopb
mv nanopb/pb.h src/nanopb/nanopb.pb.h
- name: build RP2040 platforms
run: python3 ci/build_platform.py ${{ matrix.arduino-platform }} --build_timeout 48000
- name: Rename build artifacts to reflect the platform name
run: |
mv examples/*/build/*/Wippersnapper_demo_offline.ino.uf2 wippersnapper.${{ matrix.arduino-platform }}.${{ env.WS_VERSION }}.uf2
- name: upload build artifacts
uses: actions/upload-artifact@v4
with:
name: build-files-${{ matrix.arduino-platform }}.${{ env.WS_VERSION }}
path: |
wippersnapper.${{ matrix.arduino-platform }}.${{ env.WS_VERSION }}.uf2

merge-job-build-files:
name: Merge Artifacts for build-files
runs-on: ubuntu-latest
needs: [build-esp32sx, build-rp2040]
steps:
- name: Merge Artifacts from Builds
uses: actions/upload-artifact/merge@v4
with:
name: build-files
pattern: build-files-!(dev)-*
delete-merged: true


release-wippersnapper:
name: 🚀 Upload Release Files
runs-on: ubuntu-latest
needs: merge-job-build-files
steps:
- name: Download build artifacts from build-platform steps
uses: actions/download-artifact@v4
with:
name: build-files
- name: List Files
run: ls
- name: Upload Assets to the GitHub Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
wippersnapper.*.uf2
wippersnapper.*.bin
wippersnapper.*.zip
17 changes: 13 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,22 @@ html/*
# VSCode artifacts
.vscode/*
src/.vscode/settings.json

.DS_STORE

examples/Wippersnapper_demo/build/

# Virtual environment directories
.venv/
venv/

# Python artifacts
tests/__pycache__/

# Platformio artifacts
.pio/

# Secrets
data/
# These sometimes contain credentials, don't commit them!
src/Wippersnapper_demo_wokwi.ino
data/

# Test results
report.xml
15 changes: 13 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
{
"files.associations": {
"limits": "c",
"type_traits": "c"
"type_traits": "c",
"vector": "cpp",
"array": "cpp",
"deque": "cpp",
"string": "cpp",
"unordered_map": "cpp",
"string_view": "cpp",
"initializer_list": "cpp",
"span": "cpp",
"*.tcc": "cpp",
"list": "cpp",
"unordered_set": "cpp"
},
"C_Cpp.dimInactiveRegions": true,
"C_Cpp.dimInactiveRegions": false,
"dotnet.defaultSolution": "disable",
"cmake.configureOnOpen": false
}
Loading
Loading