Skip to content

Commit 1922364

Browse files
authored
Merge pull request #502 from brentru/migrate-to-bsp-3
Migrate from Arduino ESP32 Core 2.x to 3.x, IDF 5.1
2 parents 74aa016 + 62c7d1f commit 1922364

File tree

64 files changed

+233
-241
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+233
-241
lines changed

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

Lines changed: 70 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,20 +36,20 @@ jobs:
3636
echo >>$GITHUB_ENV WS_VERSION=$(git describe --dirty --tags)
3737
- uses: actions/checkout@v2
3838
with:
39-
repository: adafruit/ci-arduino
39+
repository: brentru/ci-arduino
4040
path: ci
4141
- name: Install CI-Arduino
4242
run: bash ci/actions_install.sh
4343
- name: Install extra Arduino libraries
4444
run: |
4545
git clone --quiet https://github.com/milesburton/Arduino-Temperature-Control-Library.git /home/runner/Arduino/libraries/Arduino-Temperature-Control-Library
46-
git clone --quiet https://github.com/PaulStoffregen/OneWire.git /home/runner/Arduino/libraries/OneWire
46+
git clone --quiet https://github.com/pstolarz/OneWireNg.git /home/runner/Arduino/libraries/OneWireNg
4747
git clone --quiet https://github.com/adafruit/Adafruit_HX8357_Library.git /home/runner/Arduino/libraries/Adafruit_HX8357_Library
4848
git clone --quiet https://github.com/adafruit/Adafruit_ILI9341.git /home/runner/Arduino/libraries/Adafruit_ILI9341
4949
git clone --quiet https://github.com/adafruit/Adafruit_STMPE610.git /home/runner/Arduino/libraries/Adafruit_STMPE610
5050
git clone --quiet https://github.com/adafruit/Adafruit-ST7735-Library.git /home/runner/Arduino/libraries/Adafruit-ST7735-Library
5151
git clone --quiet https://github.com/adafruit/Adafruit_TouchScreen.git /home/runner/Arduino/libraries/Adafruit_TouchScreen
52-
git clone --depth 1 --branch v8.2.0 https://github.com/lvgl/lvgl.git /home/runner/Arduino/libraries/lvgl
52+
git clone --depth 1 --branch wippersnapper https://github.com/brentru/lvgl.git /home/runner/Arduino/libraries/lvgl
5353
git clone --depth 1 --branch development https://github.com/brentru/Adafruit_LvGL_Glue.git /home/runner/Arduino/libraries/Adafruit_LittlevGL_Glue_Library
5454
- name: List all files in Adafruit_LittlevGL_Glue_Library folder
5555
run: |
@@ -98,7 +98,7 @@ jobs:
9898
echo >>$GITHUB_ENV WS_VERSION=$(git describe --dirty --tags)
9999
- uses: actions/checkout@v2
100100
with:
101-
repository: adafruit/ci-arduino
101+
repository: brentru/ci-arduino
102102
path: ci
103103
- name: Checkout Board Definitions
104104
uses: actions/checkout@v2
@@ -110,12 +110,15 @@ jobs:
110110
- name: Install extra Arduino libraries
111111
run: |
112112
git clone --quiet https://github.com/milesburton/Arduino-Temperature-Control-Library.git /home/runner/Arduino/libraries/Arduino-Temperature-Control-Library
113-
git clone --quiet https://github.com/PaulStoffregen/OneWire.git /home/runner/Arduino/libraries/OneWire
113+
git clone --quiet https://github.com/pstolarz/OneWireNg.git /home/runner/Arduino/libraries/OneWireNg
114114
- name: Install Dependencies
115115
run: |
116116
pip3 install esptool
117117
- name: build ESP32 platforms
118118
run: python3 ci/build_platform.py ${{ matrix.arduino-platform }} --build_timeout 48000
119+
- name: Check artifacts
120+
run: |
121+
ls examples/Wippersnapper_demo/build/*
119122
- name: Rename build artifacts to reflect the platform name
120123
run: |
121124
mv examples/Wippersnapper_demo/build/*/Wippersnapper_demo.ino.bin wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.bin
@@ -329,6 +332,68 @@ jobs:
329332
path: |
330333
wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.zip
331334
335+
build-esp32sx-dev:
336+
name: Build WipperSnapper ESP32-Sx DEV BUILDS
337+
runs-on: ubuntu-latest
338+
strategy:
339+
fail-fast: false
340+
matrix:
341+
arduino-platform: ["feather_esp32s2_dev", "feather_esp32s2_tft_dev",
342+
"feather_esp32s2_reverse_tft_dev", "feather_esp32s3_dev",
343+
"feather_esp32s3_4mbflash_2mbpsram_dev", "feather_esp32s3_tft_dev",
344+
"feather_esp32s3_reverse_tft_dev"]
345+
steps:
346+
- uses: actions/setup-python@v1
347+
with:
348+
python-version: '3.x'
349+
- uses: actions/checkout@v2
350+
- name: Get WipperSnapper version
351+
run: |
352+
git fetch --prune --unshallow --tags
353+
git describe --dirty --tags
354+
echo >>$GITHUB_ENV WS_VERSION=$(git describe --dirty --tags)
355+
- uses: actions/checkout@v2
356+
with:
357+
repository: brentru/ci-arduino
358+
path: ci
359+
- name: Install CI-Arduino
360+
run: bash ci/actions_install.sh
361+
- name: Install extra Arduino libraries
362+
run: |
363+
git clone --quiet https://github.com/milesburton/Arduino-Temperature-Control-Library.git /home/runner/Arduino/libraries/Arduino-Temperature-Control-Library
364+
git clone --quiet https://github.com/pstolarz/OneWireNg.git /home/runner/Arduino/libraries/OneWireNg
365+
git clone --quiet https://github.com/adafruit/Adafruit_HX8357_Library.git /home/runner/Arduino/libraries/Adafruit_HX8357_Library
366+
git clone --quiet https://github.com/adafruit/Adafruit_ILI9341.git /home/runner/Arduino/libraries/Adafruit_ILI9341
367+
git clone --quiet https://github.com/adafruit/Adafruit_STMPE610.git /home/runner/Arduino/libraries/Adafruit_STMPE610
368+
git clone --quiet https://github.com/adafruit/Adafruit-ST7735-Library.git /home/runner/Arduino/libraries/Adafruit-ST7735-Library
369+
git clone --quiet https://github.com/adafruit/Adafruit_TouchScreen.git /home/runner/Arduino/libraries/Adafruit_TouchScreen
370+
git clone --depth 1 --branch wippersnapper https://github.com/brentru/lvgl.git /home/runner/Arduino/libraries/lvgl
371+
git clone --depth 1 --branch development https://github.com/brentru/Adafruit_LvGL_Glue.git /home/runner/Arduino/libraries/Adafruit_LittlevGL_Glue_Library
372+
- name: List all files in Adafruit_LittlevGL_Glue_Library folder
373+
run: |
374+
ls /home/runner/Arduino/libraries/Adafruit_LittlevGL_Glue_Library
375+
- name: Copy lv_conf.h file in Adafruit_LittlevGL_Glue_Library to the arduino library folder
376+
run: |
377+
cp /home/runner/Arduino/libraries/Adafruit_LittlevGL_Glue_Library/lv_conf.h /home/runner/Arduino/libraries
378+
- name: Build for ESP32-SX
379+
run: python3 ci/build_platform.py ${{ matrix.arduino-platform }} --build_timeout 48000
380+
- name: list
381+
run: |
382+
ls
383+
ls examples/*/build/
384+
- name: Rename build artifacts to reflect the platform name
385+
run: |
386+
mv examples/*/build/*/wippersnapper_debug.ino.uf2 wippersnapper.${{ matrix.arduino-platform }}.${{ env.WS_VERSION }}.uf2
387+
mv examples/*/build/*/wippersnapper_debug.ino.bin wippersnapper.${{ matrix.arduino-platform }}.${{ env.WS_VERSION }}.bin
388+
- name: upload build artifacts
389+
uses: actions/upload-artifact@v3
390+
with:
391+
name: build-files-dev
392+
path: |
393+
wippersnapper.${{ matrix.arduino-platform }}.${{ env.WS_VERSION }}.uf2
394+
wippersnapper.${{ matrix.arduino-platform }}.${{ env.WS_VERSION }}.bin
395+
396+
332397
333398
clang_and_doxy:
334399
runs-on: ubuntu-latest

README.md

Lines changed: 1 addition & 1 deletion

examples/Wippersnapper_NoFS/.DS_Store

0 Bytes
Binary file not shown.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
2+
3+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// Adafruit IO WipperSnapper Beta (DEBUG BUILD ONLY!)
2+
// Brent Rubell for Adafruit Industries, 2021 - 2023
3+
4+
#include "Wippersnapper_Networking.h"
5+
Wippersnapper_WiFi wipper;
6+
7+
// Enable debug output for beta builds
8+
#define WS_DEBUG
9+
10+
void setup() {
11+
// Provisioning must occur prior to serial init.
12+
wipper.provision();
13+
14+
Serial.begin(115200); // wippersnapper serial
15+
Serial1.begin(115200); // ESP-IDF messages serial
16+
Serial1.setDebugOutput(true); // Enable ESP-IDF messages over Serial1
17+
//while (!Serial) delay(10);
18+
19+
wipper.connect();
20+
}
21+
22+
void loop() {
23+
wipper.run();
24+
}

library.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name=Adafruit WipperSnapper
2-
version=1.0.0-beta.73
2+
version=1.0.0-alpha.74
33
author=Adafruit
44
maintainer=Adafruit <adafruitio@adafruit.com>
5-
sentence=Arduino client for Adafruit.io WipperSnapper
6-
paragraph=Arduino client for Adafruit.io WipperSnapper
5+
sentence=Arduino application for Adafruit.io WipperSnapper
6+
paragraph=Arduino application for Adafruit.io WipperSnapper
77
category=Communication
88
url=https://github.com/adafruit/Adafruit_IO_Arduino
99
architectures=*

src/Wippersnapper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1210,7 +1210,7 @@ bool cbPWMDecodeMsg(pb_istream_t *stream, const pb_field_t *field, void **arg) {
12101210

12111211
#ifdef USE_DISPLAY
12121212
char buffer[100];
1213-
snprintf(buffer, 100, "[PWM] Writing %u Hz to pin %s\n.",
1213+
snprintf(buffer, 100, "[PWM] Writing %ld Hz to pin %s\n.",
12141214
msgPWMWriteFreqRequest.frequency, msgPWMWriteFreqRequest.pin);
12151215
WS._ui_helper->add_text_to_terminal(buffer);
12161216
#endif

src/Wippersnapper.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* please support Adafruit and open-source hardware by purchasing
1010
* products from Adafruit!
1111
*
12-
* Copyright (c) Brent Rubell 2020-2022 for Adafruit Industries.
12+
* Copyright (c) Brent Rubell 2020-2023 for Adafruit Industries.
1313
*
1414
* BSD license, all text here must be included in any redistribution.
1515
*
@@ -71,7 +71,7 @@
7171
#endif
7272

7373
#define WS_VERSION \
74-
"1.0.0-beta.73" ///< WipperSnapper app. version (semver-formatted)
74+
"1.0.0-alpha.74" ///< WipperSnapper app. version (semver-formatted)
7575

7676
// Reserved Adafruit IO MQTT topics
7777
#define TOPIC_IO_THROTTLE "/throttle" ///< Adafruit IO Throttle MQTT Topic

src/components/i2c/WipperSnapper_I2C.cpp

Lines changed: 30 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -816,65 +816,70 @@ void WipperSnapper_Component_I2C::displayDeviceEventMessage(
816816
msgi2cResponse->payload.resp_i2c_device_event.sensor_event[i].type) {
817817
case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_AMBIENT_TEMPERATURE:
818818
case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_OBJECT_TEMPERATURE:
819-
snprintf(buffer, 100, "[I2C: %#x] Read: %0.3f *C\n", sensorAddress,
820-
value);
819+
snprintf(buffer, 100, "[I2C: %#x] Read: %0.3f *C\n",
820+
(unsigned int)sensorAddress, value);
821821
break;
822822
case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_AMBIENT_TEMPERATURE_FAHRENHEIT:
823823
case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_OBJECT_TEMPERATURE_FAHRENHEIT:
824-
snprintf(buffer, 100, "[I2C: %#x] Read: %0.3f *F\n", sensorAddress,
825-
value);
824+
snprintf(buffer, 100, "[I2C: %#x] Read: %0.3f *F\n",
825+
(unsigned int)sensorAddress, value);
826826
break;
827827
case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_RELATIVE_HUMIDITY:
828-
snprintf(buffer, 100, "[I2C: %#x] Read: %0.3f %% rh\n", sensorAddress,
829-
value);
828+
snprintf(buffer, 100, "[I2C: %#x] Read: %0.3f %% rh\n",
829+
(unsigned int)sensorAddress, value);
830830
break;
831831
case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_PRESSURE:
832-
snprintf(buffer, 100, "[I2C: %#x] Read: %0.3f hPA\n", sensorAddress,
833-
value);
832+
snprintf(buffer, 100, "[I2C: %#x] Read: %0.3f hPA\n",
833+
(unsigned int)sensorAddress, value);
834834
break;
835835
case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_ALTITUDE:
836-
snprintf(buffer, 100, "[I2C: %x] Read: %0.3f m\n", sensorAddress, value);
836+
snprintf(buffer, 100, "[I2C: %x] Read: %0.3f m\n",
837+
(unsigned int)sensorAddress, value);
837838
break;
838839
case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_LIGHT:
839-
snprintf(buffer, 100, "[I2C: %x] Read: %0.3f lux\n", sensorAddress,
840-
value);
840+
snprintf(buffer, 100, "[I2C: %x] Read: %0.3f lux\n",
841+
(unsigned int)sensorAddress, value);
841842
break;
842843
case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_PM10_STD:
843844
case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_PM25_STD:
844845
case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_PM100_STD:
845846
case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_CO2:
846847
case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_ECO2:
847-
snprintf(buffer, 100, "[I2C: %x] Read: %0.3f ppm\n", sensorAddress,
848-
value);
848+
snprintf(buffer, 100, "[I2C: %x] Read: %0.3f ppm\n",
849+
(unsigned int)sensorAddress, value);
849850
break;
850851
case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_TVOC:
851-
snprintf(buffer, 100, "[I2C: %x] Read: %0.3f ppb\n", sensorAddress,
852-
value);
852+
snprintf(buffer, 100, "[I2C: %x] Read: %0.3f ppb\n",
853+
(unsigned int)sensorAddress, value);
853854
break;
854855
case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_UNITLESS_PERCENT:
855-
snprintf(buffer, 100, "[I2C: %x] Read: %0.3f%%\n", sensorAddress, value);
856+
snprintf(buffer, 100, "[I2C: %x] Read: %0.3f%%\n",
857+
(unsigned int)sensorAddress, value);
856858
break;
857859
case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_VOLTAGE:
858-
snprintf(buffer, 100, "[I2C: %x] Read: %0.3f V\n", sensorAddress, value);
860+
snprintf(buffer, 100, "[I2C: %x] Read: %0.3f V\n",
861+
(unsigned int)sensorAddress, value);
859862
break;
860863
case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_CURRENT:
861-
snprintf(buffer, 100, "[I2C: %x] Read: %0.3f mA\n", sensorAddress, value);
864+
snprintf(buffer, 100, "[I2C: %x] Read: %0.3f mA\n",
865+
(unsigned int)sensorAddress, value);
862866
break;
863867
case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_RAW:
864868
case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_PROXIMITY:
865-
snprintf(buffer, 100, "[I2C: %x] Read: %0.3f\n", sensorAddress, value);
869+
snprintf(buffer, 100, "[I2C: %x] Read: %0.3f\n",
870+
(unsigned int)sensorAddress, value);
866871
break;
867872
case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_GAS_RESISTANCE:
868-
snprintf(buffer, 100, "[I2C: %x] Read: %0.3f Ohms\n", sensorAddress,
869-
value);
873+
snprintf(buffer, 100, "[I2C: %x] Read: %0.3f Ohms\n",
874+
(unsigned int)sensorAddress, value);
870875
break;
871876
case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_NOX_INDEX:
872-
snprintf(buffer, 100, "[I2C: %x] Read: %0.3f NOX\n", sensorAddress,
873-
value);
877+
snprintf(buffer, 100, "[I2C: %x] Read: %0.3f NOX\n",
878+
(unsigned int)sensorAddress, value);
874879
break;
875880
case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_VOC_INDEX:
876-
snprintf(buffer, 100, "[I2C: %x] Read: %0.3f VOC\n", sensorAddress,
877-
value);
881+
snprintf(buffer, 100, "[I2C: %x] Read: %0.3f VOC\n",
882+
(unsigned int)sensorAddress, value);
878883
break;
879884
default:
880885
break;

0 commit comments

Comments
 (0)