Skip to content

Commit c164dc3

Browse files
committed
Merge branch 'offline-mode' into migrate-api-v2
2 parents 903db88 + 0de3e5c commit c164dc3

File tree

7 files changed

+37
-27
lines changed

7 files changed

+37
-27
lines changed

.github/workflows/build-clang-doxy.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -521,6 +521,7 @@ jobs:
521521
run: |
522522
git clone --quiet https://github.com/pstolarz/OneWireNg.git /home/runner/Arduino/libraries/OneWireNg
523523
git clone --quiet https://github.com/pstolarz/Arduino-Temperature-Control-Library.git /home/runner/Arduino/libraries/Arduino-Temperature-Control-Library
524+
git clone --quiet https://github.com/brentru/Adafruit_SPIFlash.git /home/runner/Arduino/libraries/Adafruit_SPIFlash
524525
git clone --quiet https://github.com/adafruit/Adafruit_TinyUSB_Arduino /home/runner/Arduino/libraries/Adafruit_TinyUSB_Arduino
525526
- name: Download stable Nanopb
526527
id: download-nanopb
Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,37 @@
1-
# SPDX-FileCopyrightText: Brent Rubell for Adafruit Industries, 2022 - 2024
1+
# SPDX-FileCopyrightText: Brent Rubell for Adafruit Industries, 2022-2025
22
#
33
# SPDX-License-Identifier: MIT
44
name: WipperSnapper Release Workflow
5-
65
on:
76
release:
87
types: [published]
9-
branches-ignore:
10-
- offline-mode
8+
workflow_call:
119
secrets:
1210
GH_REPO_TOKEN:
1311
required: true
14-
1512
jobs:
13+
check-branch:
14+
runs-on: ubuntu-latest
15+
outputs:
16+
should_run: ${{ steps.check.outputs.should_run }}
17+
steps:
18+
- id: check
19+
run: |
20+
if [[ $GITHUB_REF == *"offline-mode"* ]]; then
21+
echo "should_run=false" >> $GITHUB_OUTPUT
22+
else
23+
echo "should_run=true" >> $GITHUB_OUTPUT
24+
fi
25+
shell: bash
26+
1627
call-workflow-build:
28+
needs: check-branch
29+
if: needs.check-branch.outputs.should_run == 'true'
1730
uses: adafruit/Adafruit_Wippersnapper_Arduino/.github/workflows/build-clang-doxy.yml@main
1831
secrets:
1932
GH_REPO_TOKEN: ${{ secrets.GH_REPO_TOKEN }}
20-
33+
2134
call-workflow-release:
22-
needs: call-workflow-build
23-
uses: adafruit/Adafruit_Wippersnapper_Arduino/.github/workflows/release-callee.yml@main
35+
needs: [check-branch, call-workflow-build]
36+
if: needs.check-branch.outputs.should_run == 'true'
37+
uses: adafruit/Adafruit_Wippersnapper_Arduino/.github/workflows/release-callee.yml@main

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ paragraph=Arduino application for Adafruit.io WipperSnapper
77
category=Communication
88
url=https://github.com/adafruit/Adafruit_Wippersnapper_Arduino
99
architectures=*
10-
depends=Adafruit NeoPixel, Adafruit SPIFlash, ArduinoJson, Adafruit DotStar, Adafruit INA219, Adafruit LTR329 and LTR303, Adafruit LTR390 Library, Adafruit MCP3421, Adafruit NAU7802 Library, Adafruit SleepyDog Library, Adafruit TMP117, Adafruit TinyUSB Library, Adafruit AHTX0, Adafruit BME280 Library, Adafruit BMP280 Library, Adafruit BMP3XX Library, Adafruit DPS310, Adafruit DS248x, Adafruit SCD30, Adafruit SGP30 Sensor, Adafruit SGP40 Sensor, Sensirion I2C SCD4x, Sensirion I2C SEN5X, arduino-sht, Adafruit Si7021 Library, Adafruit MQTT Library, Adafruit MS8607, Adafruit MCP9808 Library, Adafruit MCP9600 Library, Adafruit MPL115A2, Adafruit MPRLS Library, Adafruit TSL2591 Library, Adafruit_VL53L0X, Adafruit VL53L1X, STM32duino VL53L4CD, STM32duino VL53L4CX, Adafruit_VL6180X, Adafruit PM25 AQI Sensor, Adafruit VCNL4020 Library, Adafruit VCNL4040, Adafruit VEML7700 Library, Adafruit LC709203F, Adafruit LPS2X, Adafruit LPS35HW, Adafruit seesaw Library, Adafruit BME680 Library, Adafruit MAX1704X, Adafruit ADT7410 Library, Adafruit HTS221, Adafruit HTU21DF Library, Adafruit HTU31D Library, Adafruit PCT2075, hp_BH1750, ENS160 - Adafruit Fork, RTClib, StreamUtils, Adafruit BusIO, Adafruit Unified Sensor, Sensirion Core, SdFat - Adafruit Fork, Adafruit GFX Library
10+
depends=SdFat - Adafruit Fork, Adafruit SPIFlash, Adafruit NeoPixel, ArduinoJson, Adafruit DotStar, Adafruit HDC302x, Adafruit INA219, Adafruit LTR329 and LTR303, Adafruit LTR390 Library, Adafruit MCP3421, Adafruit NAU7802 Library, Adafruit SleepyDog Library, Adafruit TMP117, Adafruit TinyUSB Library, Adafruit AHTX0, Adafruit BME280 Library, Adafruit BMP280 Library, Adafruit BMP3XX Library, Adafruit DPS310, Adafruit DS248x, Adafruit SCD30, Adafruit SGP30 Sensor, Adafruit SGP40 Sensor, Sensirion I2C SCD4x, Sensirion I2C SEN5X, Sensirion I2C SEN66, arduino-sht, Adafruit Si7021 Library, Adafruit MQTT Library, Adafruit MS8607, Adafruit MCP9808 Library, Adafruit MCP9600 Library, Adafruit MPL115A2, Adafruit MPRLS Library, Adafruit TSL2591 Library, Adafruit_VL53L0X, Adafruit VL53L1X, STM32duino VL53L4CD, STM32duino VL53L4CX, Adafruit_VL6180X, Adafruit PM25 AQI Sensor, Adafruit VCNL4020 Library, Adafruit VCNL4040, Adafruit VCNL4200 Library, Adafruit VEML7700 Library, Adafruit LC709203F, Adafruit LPS2X, Adafruit LPS28, Adafruit LPS35HW, Adafruit seesaw Library, Adafruit BME680 Library, Adafruit MAX1704X, Adafruit ADT7410 Library, Adafruit HTS221, Adafruit HTU21DF Library, Adafruit HTU31D Library, Adafruit PCT2075, hp_BH1750, ENS160 - Adafruit Fork, Adafruit BusIO, Adafruit Unified Sensor, Sensirion Core, Adafruit GFX Library, RTClib, StreamUtils, Adafruit SHT4x Library

platformio.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ lib_deps =
7070
adafruit/Adafruit STMPE610
7171
adafruit/Adafruit TouchScreen
7272
adafruit/Adafruit MQTT Library
73+
https://github.com/adafruit/Adafruit_SHT4X.git
7374
bblanchon/ArduinoJson
7475
https://github.com/adafruit/SdFat.git
7576
https://github.com/pstolarz/OneWireNg.git

src/components/i2c/drivers/drvSht4x.h

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,8 @@
1818
#ifndef DRV_SHT4X_H
1919
#define DRV_SHT4X_H
2020

21+
#include "Adafruit_SHT4x.h"
2122
#include "drvBase.h"
22-
#include <SHTSensor.h>
23-
#include <Wire.h>
2423

2524
/**************************************************************************/
2625
/*!
@@ -56,12 +55,12 @@ class drvSht4x : public drvBase {
5655
*/
5756
/*******************************************************************************/
5857
bool begin() override {
59-
_sht4x = new SHTSensor(SHTSensor::SHT4X);
60-
if (!_sht4x->init(*_i2c))
58+
_sht4x = new Adafruit_SHT4x();
59+
if (!_sht4x->begin())
6160
return false;
6261

63-
// configure SHT4x sensor
64-
_sht4x->setAccuracy(SHTSensor::SHT_ACCURACY_HIGH);
62+
_sht4x->setPrecision(SHT4X_HIGH_PRECISION);
63+
_sht4x->setHeater(SHT4X_NO_HEATER);
6564

6665
return true;
6766
}
@@ -76,10 +75,8 @@ class drvSht4x : public drvBase {
7675
*/
7776
/*******************************************************************************/
7877
bool getEventAmbientTemp(sensors_event_t *tempEvent) {
79-
// populate temp and humidity objects with fresh data
80-
if (!_sht4x->readSample())
81-
return false;
82-
tempEvent->temperature = _sht4x->getTemperature();
78+
sensors_event_t humid;
79+
_sht4x->getEvent(&humid, tempEvent);
8380
return true;
8481
}
8582

@@ -93,15 +90,12 @@ class drvSht4x : public drvBase {
9390
*/
9491
/*******************************************************************************/
9592
bool getEventRelativeHumidity(sensors_event_t *humidEvent) {
96-
// populate temp and humidity objects with fresh data
97-
if (!_sht4x->readSample())
98-
return false;
99-
humidEvent->relative_humidity = _sht4x->getHumidity();
93+
sensors_event_t temp;
94+
_sht4x->getEvent(humidEvent, &temp);
10095
return true;
10196
}
10297

10398
protected:
104-
SHTSensor *_sht4x; ///< SHT4X object
99+
Adafruit_SHT4x *_sht4x; ///< SHT4X object
105100
};
106-
107101
#endif // drvSht4x

src/provisioning/sdcard/ws_sdcard.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#ifndef WS_SDCARD_H
1616
#define WS_SDCARD_H
1717
#include "RTClib.h"
18-
#include "SdFat.h"
18+
#include "SdFat_Adafruit_Fork.h"
1919
#include "StreamUtils.h"
2020
#include "Wippersnapper_V2.h"
2121
#include "sdios.h"

src/provisioning/tinyusb/Wippersnapper_FS.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
#include "Adafruit_SPIFlash.h"
1919
#include "Adafruit_TinyUSB.h"
20-
#include "SdFat.h"
20+
#include "SdFat_Adafruit_Fork.h"
2121
// using f_mkfs() for formatting
2222
#include "fatfs/ff.h" // NOTE: This should be #included before fatfs/diskio.h!!!
2323
#include "fatfs/diskio.h"

0 commit comments

Comments
 (0)