diff --git a/.github/workflows/build-clang-doxy.yml b/.github/workflows/build-clang-doxy.yml index 17b3a5fd7..077bfd59d 100644 --- a/.github/workflows/build-clang-doxy.yml +++ b/.github/workflows/build-clang-doxy.yml @@ -36,20 +36,20 @@ jobs: echo >>$GITHUB_ENV WS_VERSION=$(git describe --dirty --tags) - uses: actions/checkout@v2 with: - repository: adafruit/ci-arduino + repository: brentru/ci-arduino 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/PaulStoffregen/OneWire.git /home/runner/Arduino/libraries/OneWire + 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 --depth 1 --branch v8.2.0 https://github.com/lvgl/lvgl.git /home/runner/Arduino/libraries/lvgl + 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: List all files in Adafruit_LittlevGL_Glue_Library folder run: | @@ -98,7 +98,7 @@ jobs: echo >>$GITHUB_ENV WS_VERSION=$(git describe --dirty --tags) - uses: actions/checkout@v2 with: - repository: adafruit/ci-arduino + repository: brentru/ci-arduino path: ci - name: Checkout Board Definitions uses: actions/checkout@v2 @@ -110,12 +110,15 @@ jobs: - 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/PaulStoffregen/OneWire.git /home/runner/Arduino/libraries/OneWire + git clone --quiet https://github.com/pstolarz/OneWireNg.git /home/runner/Arduino/libraries/OneWireNg - name: Install Dependencies run: | pip3 install esptool - name: build ESP32 platforms run: python3 ci/build_platform.py ${{ matrix.arduino-platform }} --build_timeout 48000 + - name: Check artifacts + run: | + ls examples/Wippersnapper_demo/build/* - name: Rename build artifacts to reflect the platform name run: | mv examples/Wippersnapper_demo/build/*/Wippersnapper_demo.ino.bin wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.bin @@ -329,6 +332,68 @@ jobs: path: | wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.zip + build-esp32sx-dev: + name: Build WipperSnapper ESP32-Sx DEV BUILDS + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + arduino-platform: ["feather_esp32s2_dev", "feather_esp32s2_tft_dev", + "feather_esp32s2_reverse_tft_dev", "feather_esp32s3_dev", + "feather_esp32s3_4mbflash_2mbpsram_dev", "feather_esp32s3_tft_dev", + "feather_esp32s3_reverse_tft_dev"] + steps: + - uses: actions/setup-python@v1 + with: + python-version: '3.x' + - uses: actions/checkout@v2 + - 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@v2 + with: + repository: brentru/ci-arduino + 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 --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: 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 + run: | + ls + ls examples/*/build/ + - name: Rename build artifacts to reflect the platform name + run: | + mv examples/*/build/*/wippersnapper_debug.ino.uf2 wippersnapper.${{ matrix.arduino-platform }}.${{ env.WS_VERSION }}.uf2 + mv examples/*/build/*/wippersnapper_debug.ino.bin wippersnapper.${{ matrix.arduino-platform }}.${{ env.WS_VERSION }}.bin + - name: upload build artifacts + uses: actions/upload-artifact@v3 + with: + name: build-files-dev + path: | + wippersnapper.${{ matrix.arduino-platform }}.${{ env.WS_VERSION }}.uf2 + wippersnapper.${{ matrix.arduino-platform }}.${{ env.WS_VERSION }}.bin + + clang_and_doxy: runs-on: ubuntu-latest diff --git a/README.md b/README.md index f221cfe9a..d72345c81 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Pre-compiled binaries and UF2 files for supported hardware are provided on the [ |Platform| MCU(s) | |--|--| -|[ESP32](https://github.com/espressif/arduino-esp32)| ESP32, ESP32-S2, ESP32-S3, ESP32-C3 | +|[ESP32-x](https://github.com/espressif/arduino-esp32)| ESP32, ESP32-S2, ESP32-S3, ESP32-C3 | |[ESP8266](https://github.com/esp8266/Arduino)| ESP8266 | |[RP2040](https://github.com/earlephilhower/arduino-pico)| RP2040 MCU w/WiFi (i.e: Pico W) | |[ATSAMD](https://github.com/adafruit/ArduinoCore-samd/)| SAMD51 MCU w/separate WiFi Co-Processor (i.e: Adafruit "AirLift")| diff --git a/examples/Wippersnapper_NoFS/.DS_Store b/examples/Wippersnapper_NoFS/.DS_Store index 8f7026824..d812294d0 100644 Binary files a/examples/Wippersnapper_NoFS/.DS_Store and b/examples/Wippersnapper_NoFS/.DS_Store differ diff --git a/examples/Wippersnapper_NoFS/.feather_esp32_v2_daily.test.skip b/examples/Wippersnapper_NoFS/.feather_esp32_s3_reverse_tft_dev.test.skip similarity index 100% rename from examples/Wippersnapper_NoFS/.feather_esp32_v2_daily.test.skip rename to examples/Wippersnapper_NoFS/.feather_esp32_s3_reverse_tft_dev.test.skip diff --git a/examples/Wippersnapper_demo/.feather_esp32_v2_daily.generate b/examples/Wippersnapper_NoFS/.feather_esp32_v2_debug.test.skip similarity index 100% rename from examples/Wippersnapper_demo/.feather_esp32_v2_daily.generate rename to examples/Wippersnapper_NoFS/.feather_esp32_v2_debug.test.skip diff --git a/examples/Wippersnapper_NoFS/.feather_esp32s2_dev.test.skip b/examples/Wippersnapper_NoFS/.feather_esp32s2_dev.test.skip new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/examples/Wippersnapper_NoFS/.feather_esp32s2_dev.test.skip @@ -0,0 +1 @@ + diff --git a/examples/Wippersnapper_NoFS/.feather_esp32s2_reverse_tft_dev.test.skip b/examples/Wippersnapper_NoFS/.feather_esp32s2_reverse_tft_dev.test.skip new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/examples/Wippersnapper_NoFS/.feather_esp32s2_reverse_tft_dev.test.skip @@ -0,0 +1 @@ + diff --git a/examples/Wippersnapper_NoFS/.feather_esp32s2_tft_dev.test.skip b/examples/Wippersnapper_NoFS/.feather_esp32s2_tft_dev.test.skip new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/examples/Wippersnapper_NoFS/.feather_esp32s2_tft_dev.test.skip @@ -0,0 +1 @@ + diff --git a/examples/Wippersnapper_NoFS/.feather_esp32s3_4mbflash_2mbpsram_dev.test.skip b/examples/Wippersnapper_NoFS/.feather_esp32s3_4mbflash_2mbpsram_dev.test.skip new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/examples/Wippersnapper_NoFS/.feather_esp32s3_4mbflash_2mbpsram_dev.test.skip @@ -0,0 +1 @@ + diff --git a/examples/Wippersnapper_NoFS/.feather_esp32s3_dev.test.skip b/examples/Wippersnapper_NoFS/.feather_esp32s3_dev.test.skip new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/examples/Wippersnapper_NoFS/.feather_esp32s3_dev.test.skip @@ -0,0 +1 @@ + diff --git a/examples/Wippersnapper_NoFS/.feather_esp32s3_reverse_tft_dev.test.skip b/examples/Wippersnapper_NoFS/.feather_esp32s3_reverse_tft_dev.test.skip new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/examples/Wippersnapper_NoFS/.feather_esp32s3_reverse_tft_dev.test.skip @@ -0,0 +1 @@ + diff --git a/examples/Wippersnapper_NoFS/.feather_esp32s3_tft_dev.test.skip b/examples/Wippersnapper_NoFS/.feather_esp32s3_tft_dev.test.skip new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/examples/Wippersnapper_NoFS/.feather_esp32s3_tft_dev.test.skip @@ -0,0 +1 @@ + diff --git a/examples/Wippersnapper_demo/.feather_esp32_s3_reverse_tft_dev.test.skip b/examples/Wippersnapper_demo/.feather_esp32_s3_reverse_tft_dev.test.skip new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/examples/Wippersnapper_demo/.feather_esp32_s3_reverse_tft_dev.test.skip @@ -0,0 +1 @@ + diff --git a/examples/Wippersnapper_demo/.feather_esp32s2_dev.test.skip b/examples/Wippersnapper_demo/.feather_esp32s2_dev.test.skip new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/examples/Wippersnapper_demo/.feather_esp32s2_dev.test.skip @@ -0,0 +1 @@ + diff --git a/examples/Wippersnapper_demo/.feather_esp32s2_reverse_tft_dev.test.skip b/examples/Wippersnapper_demo/.feather_esp32s2_reverse_tft_dev.test.skip new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/examples/Wippersnapper_demo/.feather_esp32s2_reverse_tft_dev.test.skip @@ -0,0 +1 @@ + diff --git a/examples/Wippersnapper_demo/.feather_esp32s2_tft_dev.test.skip b/examples/Wippersnapper_demo/.feather_esp32s2_tft_dev.test.skip new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/examples/Wippersnapper_demo/.feather_esp32s2_tft_dev.test.skip @@ -0,0 +1 @@ + diff --git a/examples/Wippersnapper_demo/.feather_esp32s3_4mbflash_2mbpsram_dev.test.skip b/examples/Wippersnapper_demo/.feather_esp32s3_4mbflash_2mbpsram_dev.test.skip new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/examples/Wippersnapper_demo/.feather_esp32s3_4mbflash_2mbpsram_dev.test.skip @@ -0,0 +1 @@ + diff --git a/examples/Wippersnapper_demo/.feather_esp32s3_dev.test.skip b/examples/Wippersnapper_demo/.feather_esp32s3_dev.test.skip new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/examples/Wippersnapper_demo/.feather_esp32s3_dev.test.skip @@ -0,0 +1 @@ + diff --git a/examples/Wippersnapper_demo/.feather_esp32s3_reverse_tft_dev.test.skip b/examples/Wippersnapper_demo/.feather_esp32s3_reverse_tft_dev.test.skip new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/examples/Wippersnapper_demo/.feather_esp32s3_reverse_tft_dev.test.skip @@ -0,0 +1 @@ + diff --git a/examples/Wippersnapper_demo/.feather_esp32s3_tft_dev.test.skip b/examples/Wippersnapper_demo/.feather_esp32s3_tft_dev.test.skip new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/examples/Wippersnapper_demo/.feather_esp32s3_tft_dev.test.skip @@ -0,0 +1 @@ + diff --git a/examples/wippersnapper_debug/.feather_esp32.test.skip b/examples/wippersnapper_debug/.feather_esp32.test.skip new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/examples/wippersnapper_debug/.feather_esp32.test.skip @@ -0,0 +1 @@ + diff --git a/examples/wippersnapper_debug/.feather_esp32_s3_reverse_tft_dev.generate b/examples/wippersnapper_debug/.feather_esp32_s3_reverse_tft_dev.generate new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/examples/wippersnapper_debug/.feather_esp32_s3_reverse_tft_dev.generate @@ -0,0 +1 @@ + diff --git a/examples/wippersnapper_debug/.feather_esp32_v2.test.skip b/examples/wippersnapper_debug/.feather_esp32_v2.test.skip new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/examples/wippersnapper_debug/.feather_esp32_v2.test.skip @@ -0,0 +1 @@ + diff --git a/examples/wippersnapper_debug/.feather_esp32_v2_debug.test.skip b/examples/wippersnapper_debug/.feather_esp32_v2_debug.test.skip new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/examples/wippersnapper_debug/.feather_esp32_v2_debug.test.skip @@ -0,0 +1 @@ + diff --git a/examples/wippersnapper_debug/.feather_esp32s2.test.skip b/examples/wippersnapper_debug/.feather_esp32s2.test.skip new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/examples/wippersnapper_debug/.feather_esp32s2.test.skip @@ -0,0 +1 @@ + diff --git a/examples/wippersnapper_debug/.feather_esp32s2_dev.generate b/examples/wippersnapper_debug/.feather_esp32s2_dev.generate new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/examples/wippersnapper_debug/.feather_esp32s2_dev.generate @@ -0,0 +1 @@ + diff --git a/examples/wippersnapper_debug/.feather_esp32s2_reverse_tft.test.skip b/examples/wippersnapper_debug/.feather_esp32s2_reverse_tft.test.skip new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/examples/wippersnapper_debug/.feather_esp32s2_reverse_tft.test.skip @@ -0,0 +1 @@ + diff --git a/examples/wippersnapper_debug/.feather_esp32s2_reverse_tft_dev.generate b/examples/wippersnapper_debug/.feather_esp32s2_reverse_tft_dev.generate new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/examples/wippersnapper_debug/.feather_esp32s2_reverse_tft_dev.generate @@ -0,0 +1 @@ + diff --git a/examples/wippersnapper_debug/.feather_esp32s2_tft.test.skip b/examples/wippersnapper_debug/.feather_esp32s2_tft.test.skip new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/examples/wippersnapper_debug/.feather_esp32s2_tft.test.skip @@ -0,0 +1 @@ + diff --git a/examples/wippersnapper_debug/.feather_esp32s2_tft_dev.generate b/examples/wippersnapper_debug/.feather_esp32s2_tft_dev.generate new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/examples/wippersnapper_debug/.feather_esp32s2_tft_dev.generate @@ -0,0 +1 @@ + diff --git a/examples/wippersnapper_debug/.feather_esp32s3.test.skip b/examples/wippersnapper_debug/.feather_esp32s3.test.skip new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/examples/wippersnapper_debug/.feather_esp32s3.test.skip @@ -0,0 +1 @@ + diff --git a/examples/wippersnapper_debug/.feather_esp32s3_4mbflash_2mbpsram.test.skip b/examples/wippersnapper_debug/.feather_esp32s3_4mbflash_2mbpsram.test.skip new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/examples/wippersnapper_debug/.feather_esp32s3_4mbflash_2mbpsram.test.skip @@ -0,0 +1 @@ + diff --git a/examples/wippersnapper_debug/.feather_esp32s3_4mbflash_2mbpsram_dev.generate b/examples/wippersnapper_debug/.feather_esp32s3_4mbflash_2mbpsram_dev.generate new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/examples/wippersnapper_debug/.feather_esp32s3_4mbflash_2mbpsram_dev.generate @@ -0,0 +1 @@ + diff --git a/examples/wippersnapper_debug/.feather_esp32s3_dev.generate b/examples/wippersnapper_debug/.feather_esp32s3_dev.generate new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/examples/wippersnapper_debug/.feather_esp32s3_dev.generate @@ -0,0 +1 @@ + diff --git a/examples/wippersnapper_debug/.feather_esp32s3_reverse_tft.test.skip b/examples/wippersnapper_debug/.feather_esp32s3_reverse_tft.test.skip new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/examples/wippersnapper_debug/.feather_esp32s3_reverse_tft.test.skip @@ -0,0 +1 @@ + diff --git a/examples/wippersnapper_debug/.feather_esp32s3_reverse_tft_dev.generate b/examples/wippersnapper_debug/.feather_esp32s3_reverse_tft_dev.generate new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/examples/wippersnapper_debug/.feather_esp32s3_reverse_tft_dev.generate @@ -0,0 +1 @@ + diff --git a/examples/wippersnapper_debug/.feather_esp32s3_tft.test.skip b/examples/wippersnapper_debug/.feather_esp32s3_tft.test.skip new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/examples/wippersnapper_debug/.feather_esp32s3_tft.test.skip @@ -0,0 +1 @@ + diff --git a/examples/wippersnapper_debug/.feather_esp32s3_tft_dev.generate b/examples/wippersnapper_debug/.feather_esp32s3_tft_dev.generate new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/examples/wippersnapper_debug/.feather_esp32s3_tft_dev.generate @@ -0,0 +1 @@ + diff --git a/examples/wippersnapper_debug/.feather_esp8266.test.skip b/examples/wippersnapper_debug/.feather_esp8266.test.skip new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/examples/wippersnapper_debug/.feather_esp8266.test.skip @@ -0,0 +1 @@ + diff --git a/examples/wippersnapper_debug/.feather_s2_tinyusb.test.skip b/examples/wippersnapper_debug/.feather_s2_tinyusb.test.skip new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/examples/wippersnapper_debug/.feather_s2_tinyusb.test.skip @@ -0,0 +1 @@ + diff --git a/examples/wippersnapper_debug/.funhouse.test.skip b/examples/wippersnapper_debug/.funhouse.test.skip new file mode 100644 index 000000000..139597f9c --- /dev/null +++ b/examples/wippersnapper_debug/.funhouse.test.skip @@ -0,0 +1,2 @@ + + diff --git a/examples/wippersnapper_debug/.magtag.test.skip b/examples/wippersnapper_debug/.magtag.test.skip new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/examples/wippersnapper_debug/.magtag.test.skip @@ -0,0 +1 @@ + diff --git a/examples/wippersnapper_debug/.metro_m4_airliftlite_tinyusb.test.skip b/examples/wippersnapper_debug/.metro_m4_airliftlite_tinyusb.test.skip new file mode 100644 index 000000000..139597f9c --- /dev/null +++ b/examples/wippersnapper_debug/.metro_m4_airliftlite_tinyusb.test.skip @@ -0,0 +1,2 @@ + + diff --git a/examples/wippersnapper_debug/.metroesp32s2.test.skip b/examples/wippersnapper_debug/.metroesp32s2.test.skip new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/examples/wippersnapper_debug/.metroesp32s2.test.skip @@ -0,0 +1 @@ + diff --git a/examples/wippersnapper_debug/.mkrwifi1010.test.skip b/examples/wippersnapper_debug/.mkrwifi1010.test.skip new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/examples/wippersnapper_debug/.mkrwifi1010.test.skip @@ -0,0 +1 @@ + diff --git a/examples/wippersnapper_debug/.nano_33_iot.test.skip b/examples/wippersnapper_debug/.nano_33_iot.test.skip new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/examples/wippersnapper_debug/.nano_33_iot.test.skip @@ -0,0 +1 @@ + diff --git a/examples/wippersnapper_debug/.picow_rp2040_tinyusb.test.skip b/examples/wippersnapper_debug/.picow_rp2040_tinyusb.test.skip new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/examples/wippersnapper_debug/.picow_rp2040_tinyusb.test.skip @@ -0,0 +1 @@ + diff --git a/examples/wippersnapper_debug/.pyportal_tinyusb.test.skip b/examples/wippersnapper_debug/.pyportal_tinyusb.test.skip new file mode 100644 index 000000000..b28b04f64 --- /dev/null +++ b/examples/wippersnapper_debug/.pyportal_tinyusb.test.skip @@ -0,0 +1,3 @@ + + + diff --git a/examples/wippersnapper_debug/.qtpy_esp32.test.skip b/examples/wippersnapper_debug/.qtpy_esp32.test.skip new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/examples/wippersnapper_debug/.qtpy_esp32.test.skip @@ -0,0 +1 @@ + diff --git a/examples/wippersnapper_debug/.qtpy_esp32c3.test.skip b/examples/wippersnapper_debug/.qtpy_esp32c3.test.skip new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/examples/wippersnapper_debug/.qtpy_esp32c3.test.skip @@ -0,0 +1 @@ + diff --git a/examples/wippersnapper_debug/.qtpy_esp32s2.test.skip b/examples/wippersnapper_debug/.qtpy_esp32s2.test.skip new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/examples/wippersnapper_debug/.qtpy_esp32s2.test.skip @@ -0,0 +1 @@ + diff --git a/examples/wippersnapper_debug/.qtpy_esp32s3.test.skip b/examples/wippersnapper_debug/.qtpy_esp32s3.test.skip new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/examples/wippersnapper_debug/.qtpy_esp32s3.test.skip @@ -0,0 +1 @@ + diff --git a/examples/wippersnapper_debug/.qtpy_esp32s3_n4r2.test.skip b/examples/wippersnapper_debug/.qtpy_esp32s3_n4r2.test.skip new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/examples/wippersnapper_debug/.qtpy_esp32s3_n4r2.test.skip @@ -0,0 +1 @@ + diff --git a/examples/wippersnapper_debug/wippersnapper_debug.ino b/examples/wippersnapper_debug/wippersnapper_debug.ino new file mode 100644 index 000000000..339ce0b6b --- /dev/null +++ b/examples/wippersnapper_debug/wippersnapper_debug.ino @@ -0,0 +1,24 @@ +// Adafruit IO WipperSnapper Beta (DEBUG BUILD ONLY!) +// Brent Rubell for Adafruit Industries, 2021 - 2023 + +#include "Wippersnapper_Networking.h" +Wippersnapper_WiFi wipper; + +// Enable debug output for beta builds +#define WS_DEBUG + +void setup() { + // Provisioning must occur prior to serial init. + wipper.provision(); + + Serial.begin(115200); // wippersnapper serial + Serial1.begin(115200); // ESP-IDF messages serial + Serial1.setDebugOutput(true); // Enable ESP-IDF messages over Serial1 + //while (!Serial) delay(10); + + wipper.connect(); +} + +void loop() { + wipper.run(); +} \ No newline at end of file diff --git a/library.properties b/library.properties index da6dda71e..ed4cae81f 100644 --- a/library.properties +++ b/library.properties @@ -1,9 +1,9 @@ name=Adafruit WipperSnapper -version=1.0.0-beta.73 +version=1.0.0-alpha.74 author=Adafruit maintainer=Adafruit -sentence=Arduino client for Adafruit.io WipperSnapper -paragraph=Arduino client for Adafruit.io WipperSnapper +sentence=Arduino application for Adafruit.io WipperSnapper +paragraph=Arduino application for Adafruit.io WipperSnapper category=Communication url=https://github.com/adafruit/Adafruit_IO_Arduino architectures=* diff --git a/src/Wippersnapper.cpp b/src/Wippersnapper.cpp index c24f9ee47..3402502eb 100644 --- a/src/Wippersnapper.cpp +++ b/src/Wippersnapper.cpp @@ -1210,7 +1210,7 @@ bool cbPWMDecodeMsg(pb_istream_t *stream, const pb_field_t *field, void **arg) { #ifdef USE_DISPLAY char buffer[100]; - snprintf(buffer, 100, "[PWM] Writing %u Hz to pin %s\n.", + snprintf(buffer, 100, "[PWM] Writing %ld Hz to pin %s\n.", msgPWMWriteFreqRequest.frequency, msgPWMWriteFreqRequest.pin); WS._ui_helper->add_text_to_terminal(buffer); #endif diff --git a/src/Wippersnapper.h b/src/Wippersnapper.h index 83dd295fc..2c06c3ee1 100644 --- a/src/Wippersnapper.h +++ b/src/Wippersnapper.h @@ -9,7 +9,7 @@ * please support Adafruit and open-source hardware by purchasing * products from Adafruit! * - * Copyright (c) Brent Rubell 2020-2022 for Adafruit Industries. + * Copyright (c) Brent Rubell 2020-2023 for Adafruit Industries. * * BSD license, all text here must be included in any redistribution. * @@ -71,7 +71,7 @@ #endif #define WS_VERSION \ - "1.0.0-beta.73" ///< WipperSnapper app. version (semver-formatted) + "1.0.0-alpha.74" ///< WipperSnapper app. version (semver-formatted) // Reserved Adafruit IO MQTT topics #define TOPIC_IO_THROTTLE "/throttle" ///< Adafruit IO Throttle MQTT Topic diff --git a/src/components/i2c/WipperSnapper_I2C.cpp b/src/components/i2c/WipperSnapper_I2C.cpp index 0fea9a3e4..f220ae656 100644 --- a/src/components/i2c/WipperSnapper_I2C.cpp +++ b/src/components/i2c/WipperSnapper_I2C.cpp @@ -816,65 +816,70 @@ void WipperSnapper_Component_I2C::displayDeviceEventMessage( msgi2cResponse->payload.resp_i2c_device_event.sensor_event[i].type) { case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_AMBIENT_TEMPERATURE: case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_OBJECT_TEMPERATURE: - snprintf(buffer, 100, "[I2C: %#x] Read: %0.3f *C\n", sensorAddress, - value); + snprintf(buffer, 100, "[I2C: %#x] Read: %0.3f *C\n", + (unsigned int)sensorAddress, value); break; case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_AMBIENT_TEMPERATURE_FAHRENHEIT: case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_OBJECT_TEMPERATURE_FAHRENHEIT: - snprintf(buffer, 100, "[I2C: %#x] Read: %0.3f *F\n", sensorAddress, - value); + snprintf(buffer, 100, "[I2C: %#x] Read: %0.3f *F\n", + (unsigned int)sensorAddress, value); break; case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_RELATIVE_HUMIDITY: - snprintf(buffer, 100, "[I2C: %#x] Read: %0.3f %% rh\n", sensorAddress, - value); + snprintf(buffer, 100, "[I2C: %#x] Read: %0.3f %% rh\n", + (unsigned int)sensorAddress, value); break; case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_PRESSURE: - snprintf(buffer, 100, "[I2C: %#x] Read: %0.3f hPA\n", sensorAddress, - value); + snprintf(buffer, 100, "[I2C: %#x] Read: %0.3f hPA\n", + (unsigned int)sensorAddress, value); break; case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_ALTITUDE: - snprintf(buffer, 100, "[I2C: %x] Read: %0.3f m\n", sensorAddress, value); + snprintf(buffer, 100, "[I2C: %x] Read: %0.3f m\n", + (unsigned int)sensorAddress, value); break; case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_LIGHT: - snprintf(buffer, 100, "[I2C: %x] Read: %0.3f lux\n", sensorAddress, - value); + snprintf(buffer, 100, "[I2C: %x] Read: %0.3f lux\n", + (unsigned int)sensorAddress, value); break; case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_PM10_STD: case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_PM25_STD: case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_PM100_STD: case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_CO2: case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_ECO2: - snprintf(buffer, 100, "[I2C: %x] Read: %0.3f ppm\n", sensorAddress, - value); + snprintf(buffer, 100, "[I2C: %x] Read: %0.3f ppm\n", + (unsigned int)sensorAddress, value); break; case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_TVOC: - snprintf(buffer, 100, "[I2C: %x] Read: %0.3f ppb\n", sensorAddress, - value); + snprintf(buffer, 100, "[I2C: %x] Read: %0.3f ppb\n", + (unsigned int)sensorAddress, value); break; case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_UNITLESS_PERCENT: - snprintf(buffer, 100, "[I2C: %x] Read: %0.3f%%\n", sensorAddress, value); + snprintf(buffer, 100, "[I2C: %x] Read: %0.3f%%\n", + (unsigned int)sensorAddress, value); break; case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_VOLTAGE: - snprintf(buffer, 100, "[I2C: %x] Read: %0.3f V\n", sensorAddress, value); + snprintf(buffer, 100, "[I2C: %x] Read: %0.3f V\n", + (unsigned int)sensorAddress, value); break; case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_CURRENT: - snprintf(buffer, 100, "[I2C: %x] Read: %0.3f mA\n", sensorAddress, value); + snprintf(buffer, 100, "[I2C: %x] Read: %0.3f mA\n", + (unsigned int)sensorAddress, value); break; case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_RAW: case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_PROXIMITY: - snprintf(buffer, 100, "[I2C: %x] Read: %0.3f\n", sensorAddress, value); + snprintf(buffer, 100, "[I2C: %x] Read: %0.3f\n", + (unsigned int)sensorAddress, value); break; case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_GAS_RESISTANCE: - snprintf(buffer, 100, "[I2C: %x] Read: %0.3f Ohms\n", sensorAddress, - value); + snprintf(buffer, 100, "[I2C: %x] Read: %0.3f Ohms\n", + (unsigned int)sensorAddress, value); break; case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_NOX_INDEX: - snprintf(buffer, 100, "[I2C: %x] Read: %0.3f NOX\n", sensorAddress, - value); + snprintf(buffer, 100, "[I2C: %x] Read: %0.3f NOX\n", + (unsigned int)sensorAddress, value); break; case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_VOC_INDEX: - snprintf(buffer, 100, "[I2C: %x] Read: %0.3f VOC\n", sensorAddress, - value); + snprintf(buffer, 100, "[I2C: %x] Read: %0.3f VOC\n", + (unsigned int)sensorAddress, value); break; default: break; diff --git a/src/components/ledc/drivers/servo/ws_ledc_servo.cpp b/src/components/ledc/drivers/servo/ws_ledc_servo.cpp index ae2c94055..e4095aa22 100644 --- a/src/components/ledc/drivers/servo/ws_ledc_servo.cpp +++ b/src/components/ledc/drivers/servo/ws_ledc_servo.cpp @@ -62,16 +62,14 @@ void ws_ledc_servo::setLEDCDriver(ws_ledc *ledcManager) { uint8_t ws_ledc_servo::attach(int pin, int minPulseWidth, int maxPulseWidth, int servoFreq) { // Attempt to attach a pin to ledc channel - uint8_t chan = - _ledcMgr->attachPin((uint8_t)pin, (double)servoFreq, LEDC_TIMER_WIDTH); - if (chan == LEDC_CH_ERR) // error! - return chan; + if (!_ledcMgr->attachPin((uint8_t)pin, (uint32_t)servoFreq, LEDC_TIMER_WIDTH)) + return 255; // configure the servo object and assign it to a pin _servo.Pin.nbr = pin; _servo.Pin.isActive = true; _minPulseWidth = minPulseWidth; _maxPulseWidth = maxPulseWidth; - return chan; + return 1; } /**************************************************************************/ diff --git a/src/components/ledc/ws_ledc.cpp b/src/components/ledc/ws_ledc.cpp index 4baba6bba..7416077bc 100644 --- a/src/components/ledc/ws_ledc.cpp +++ b/src/components/ledc/ws_ledc.cpp @@ -8,7 +8,7 @@ * please support Adafruit and open-source hardware by purchasing * products from Adafruit! * - * Written by Brent Rubell for Adafruit Industries, 2022. + * Written by Brent Rubell for Adafruit Industries, 2022-2023 * * MIT license, all text here must be included in any redistribution. * @@ -19,186 +19,57 @@ /**************************************************************************/ /*! - @brief Constructor -*/ -/**************************************************************************/ -ws_ledc::ws_ledc() { - // reset active pins - for (int i = 0; i < MAX_LEDC_PWMS; i++) { - _ledcPins[i].isActive = false; - } -} - -/**************************************************************************/ -/*! - @brief Destructor -*/ -/**************************************************************************/ -ws_ledc::~ws_ledc() { - // detach all active pins and de-allocate them - for (int i = 0; i < MAX_LEDC_PWMS; i++) { - detachPin(_ledcPins[i].pin); - _ledcPins[i].isActive = false; - } -} - -/**************************************************************************/ -/*! - @brief Checks if a channel has already been allocated for a pin. - @param pin Desired GPIO pin number. - @return The channel number if the pin was successfully or already - attached, otherwise LEDC_CH_ERR. -*/ -/**************************************************************************/ -uint8_t ws_ledc::_getChannel(uint8_t pin) { - // have we already attached this pin? - for (int i = 0; i < MAX_LEDC_PWMS; i++) { - if (_ledcPins[i].pin == pin) - return _ledcPins[i].chan; - } - return LEDC_CH_ERR; -} - -/**************************************************************************/ -/*! - @brief Allocates a timer + channel for a pin and attaches it. + @brief Sets up a LEDC pin with given frequency and resolution. @param pin Desired GPIO pin number. @param freq Desired timer frequency, in Hz. @param resolution Desired timer resolution, in bits. - @return The channel number if the pin was successfully or already - attached, otherwise 255. + @return True if configuration is successful. False is returned if error + occurs and LEDC channel was not configured. */ /**************************************************************************/ -uint8_t ws_ledc::attachPin(uint8_t pin, double freq, uint8_t resolution) { - // have we already attached this pin? - for (int i = 0; i < MAX_LEDC_PWMS; i++) { - if (_ledcPins[i].pin == pin) - return _ledcPins[i].chan; - } - - // allocate chanel - uint8_t chanNum = _allocateChannel(freq, resolution); - if (chanNum == LEDC_CH_ERR) - return chanNum; - - // attach pin to channel - ledcAttachPin(pin, chanNum); - - // allocate pin in pool - _ledcPins[chanNum].pin = pin; - _ledcPins[chanNum].chan = chanNum; - - return chanNum; +bool ws_ledc::attachPin(uint8_t pin, uint32_t freq, uint8_t resolution) { + return ledcAttach(pin, freq, resolution); } /**************************************************************************/ /*! - @brief Detaches a pin and de-allocates it from the manager. + @brief Detaches a pin from LEDC. @param pin Desired GPIO pin number. + @return True if successfully detached, False otherwise. */ /**************************************************************************/ -void ws_ledc::detachPin(uint8_t pin) { - // de-allocate the pin and the channel - for (int i = 0; i < sizeof(_ledcPins); i++) { - if (_ledcPins[i].pin == pin) { - _ledcPins[i].pin = 0; - _ledcPins[i].chan = 255; - _ledcPins[i].isActive = false; - break; - } - } - - // detach the pin - ledcDetachPin(pin); -} - -/**************************************************************************/ -/*! - @brief Allocates a channel and timer. - @param freq Timer frequency, in Hz. - @param resolution Timer resolution, in bits. - @return The channel number if the timer was successfully initialized, - otherwise 255. -*/ -/**************************************************************************/ -uint8_t ws_ledc::_allocateChannel(double freq, uint8_t resolution = 16) { - // obtain an inactive channel number - uint8_t chanNum = _getInactiveChannel(); - if (chanNum == LEDC_CH_ERR) - return LEDC_CH_ERR; // failed to obtain inactive channel # - - // attempt to set up a ledc_timer on the free channel - double rc = ledcSetup(uint8_t(chanNum), freq, resolution); - if (rc == 0) - return 255; - - // Assign - _ledcPins[chanNum].chan = chanNum; - _ledcPins[chanNum].isActive = true; - - return chanNum; -} - -/**************************************************************************/ -/*! - @brief Returns an inactive LEDC channel number. - @returns Inactive channel number if free, otherwise LEDC_CH_ERR. -*/ -/**************************************************************************/ -uint8_t ws_ledc::_getInactiveChannel() { - for (int ch = 0; ch < sizeof(_ledcPins); ch++) { - if (_ledcPins[ch].isActive == false) { - return ch; - } - } - return LEDC_CH_ERR; -} +bool ws_ledc::detachPin(uint8_t pin) { return ledcDetach(pin); } /**************************************************************************/ /*! @brief Arduino AnalogWrite function, but for ESP32's LEDC. @param pin The desired pin to write to. @param value The duty cycle. + @return True if PWM value written to LEDC pin, False otherwise. */ /**************************************************************************/ -void ws_ledc::analogWrite(uint8_t pin, int value) { +bool ws_ledc::analogWrite(uint8_t pin, int value) { if (value > 255 || value < 0) - return; + return false; - uint8_t ch; - ch = _getChannel(pin); - if (ch == LEDC_CH_ERR) { - Serial.println("ERROR: Pin not attached to channel"); - return; - } - - // perform duty cycle calculation provided value + // Calculate duty cycle for the `value` passed in // (assumes 12-bit resolution, 2^12) uint32_t dutyCycle = (4095 / 255) * min(value, 255); - // set the duty cycle of the pin - setDuty(pin, dutyCycle); + // Call duty cycle write + return setDuty(pin, dutyCycle); } /**************************************************************************/ /*! - @brief Sets the duty cycle of a pin + @brief Sets the duty cycle of a LEDC pin. @param pin Desired GPIO pin to write to. @param duty Desired duty cycle. + @return True if duty cycle was set, False otherwise. */ /**************************************************************************/ -void ws_ledc::setDuty(uint8_t pin, uint32_t duty) { - // find the channel corresponding to the pin - uint8_t chan = 0; - for (int i = 0; i < sizeof(_ledcPins); i++) { - if (_ledcPins[i].pin == pin) { - chan = _ledcPins[i].chan; - break; - } - } - - // set the channel's duty cycle - ledcWrite(chan, duty); +bool ws_ledc::setDuty(uint8_t pin, uint32_t duty) { + return ledcWrite(pin, duty); } /**************************************************************************/ @@ -207,15 +78,12 @@ void ws_ledc::setDuty(uint8_t pin, uint32_t duty) { frequency to a pin. Used by piezo buzzers and speakers. @param pin The desired pin to write to. @param freq The frequency of the tone, in Hz. + @return The frequency of the LEDC pin. 0 if error occurs and LEDC pin was + not configured. */ /**************************************************************************/ -void ws_ledc::tone(uint8_t pin, uint32_t freq) { - uint8_t ch; - ch = _getChannel(pin); - if (ch == LEDC_CH_ERR) { - // Serial.println("ERROR: Pin not previously attached!"); - } - ledcWriteTone(ch, freq); +uint32_t ws_ledc::tone(uint8_t pin, uint32_t freq) { + return ledcWriteTone(pin, freq); } #endif // ARDUINO_ARCH_ESP32 \ No newline at end of file diff --git a/src/components/ledc/ws_ledc.h b/src/components/ledc/ws_ledc.h index 858fd9501..d206767a6 100644 --- a/src/components/ledc/ws_ledc.h +++ b/src/components/ledc/ws_ledc.h @@ -8,7 +8,7 @@ * please support Adafruit and open-source hardware by purchasing * products from Adafruit! * - * Copyright (c) Brent Rubell 2022 for Adafruit Industries. + * Copyright (c) Brent Rubell 2022-2023 for Adafruit Industries. * * BSD license, all text here must be included in any redistribution. * @@ -21,18 +21,6 @@ #include "esp32-hal-ledc.h" #include "esp_err.h" -#define LEDC_CH_ERR 255 ///< LEDC channel error -#define MAX_LEDC_PWMS \ - 16 ///< maximum # of LEDC channels (see: LEDC Chan to Group/Channel/Timer - ///< Mapping) - -/** Defines a pin attached to an active LEDC timer group */ -typedef struct { - uint8_t pin; ///< GPIO pin number - uint8_t chan; ///< Channel allocated to the pin - bool isActive; ///< True if the ledcPin's timer has been initialized -} ledcPin_t; - // forward decl. class Wippersnapper; @@ -48,20 +36,24 @@ class Wippersnapper; /**************************************************************************/ class ws_ledc { public: - ws_ledc(); - ~ws_ledc(); - uint8_t attachPin(uint8_t pin, double freq, uint8_t resolution); - void detachPin(uint8_t pin); - - void setDuty(uint8_t pin, uint32_t duty); - void analogWrite(uint8_t pin, int value); - void tone(uint8_t pin, uint32_t freq); - -private: - uint8_t _allocateChannel(double freq, uint8_t resolution); - uint8_t _getChannel(uint8_t pin); - uint8_t _getInactiveChannel(); - ledcPin_t _ledcPins[MAX_LEDC_PWMS]; ///< Pool of usable LEDC pins + /**************************************************************************/ + /*! + @brief Ctor + */ + /**************************************************************************/ + ws_ledc(){}; + /**************************************************************************/ + /*! + @brief Dtor + */ + /**************************************************************************/ + ~ws_ledc(){}; + bool attachPin(uint8_t pin, uint32_t freq, uint8_t resolution); + bool detachPin(uint8_t pin); + // LEDC-API + bool setDuty(uint8_t pin, uint32_t duty); + bool analogWrite(uint8_t pin, int value); + uint32_t tone(uint8_t pin, uint32_t freq); }; extern Wippersnapper WS; diff --git a/src/components/pixels/ws_pixels.cpp b/src/components/pixels/ws_pixels.cpp index daf663f49..73db519af 100644 --- a/src/components/pixels/ws_pixels.cpp +++ b/src/components/pixels/ws_pixels.cpp @@ -434,7 +434,8 @@ void ws_pixels::fillStrand( #ifdef USE_DISPLAY char buffer[100]; snprintf(buffer, 100, "[Pixel] Filling strand on pin %s with color %u\n", - pixelsWriteMsg->pixels_pin_data, pixelsWriteMsg->pixels_color); + pixelsWriteMsg->pixels_pin_data, + (unsigned int)pixelsWriteMsg->pixels_color); WS._ui_helper->add_text_to_terminal(buffer); #endif diff --git a/src/components/pwm/ws_pwm.cpp b/src/components/pwm/ws_pwm.cpp index 06c29ca35..b50bb0bb7 100644 --- a/src/components/pwm/ws_pwm.cpp +++ b/src/components/pwm/ws_pwm.cpp @@ -51,9 +51,9 @@ bool ws_pwm::attach(uint8_t pin, double freq, uint8_t resolution) { // Future TODO: Maybe this function should be within #ifdef for ARCH_ESP32 bool is_attached = true; #if defined(ARDUINO_ARCH_ESP32) - uint8_t rc = _ledcMgr->attachPin(pin, freq, resolution); - if (rc == LEDC_CH_ERR) - is_attached = false; + bool rc = _ledcMgr->attachPin(pin, (uint32_t)freq, resolution); + if (!rc) + return false; #else (void)pin; // marking as unused parameter to avoid compiler warning (void)freq; // marking as unused parameter to avoid compiler warning diff --git a/src/components/uart/ws_uart.cpp b/src/components/uart/ws_uart.cpp index ef16ab368..d5cef5ed3 100644 --- a/src/components/uart/ws_uart.cpp +++ b/src/components/uart/ws_uart.cpp @@ -43,13 +43,6 @@ void ws_uart::initUARTBus( int32_t tx = atoi(msgUARTRequest->bus_info.pin_tx + 1); bool invert = msgUARTRequest->bus_info.is_invert; - // Print bus_info - WS_DEBUG_PRINTLN("[INFO, UART]: Initializing SW UART bus..."); - WS_DEBUG_PRINTLN("[INFO, UART]: Baud Rate: " + String(baud)); - WS_DEBUG_PRINTLN("[INFO, UART]: RX Pin: " + String(rx)); - WS_DEBUG_PRINTLN("[INFO, UART]: TX Pin: " + String(tx)); - WS_DEBUG_PRINTLN("[INFO, UART]: Invert? " + String(invert)); - // Initialize and begin UART bus depending if the platform supports either HW // UART or SW UART #ifdef USE_SW_UART @@ -150,18 +143,14 @@ bool ws_uart::initUARTDevice( wippersnapper_uart_v1_UARTDeviceAttachRequest *msgUARTRequest) { // Ensure the protobuf contains a device identifier if (strlen(msgUARTRequest->device_id) == 0) { - WS_DEBUG_PRINTLN("[ERROR, UART]: Device ID is empty!"); return false; } // Do we already have a device with this ID? for (ws_uart_drv *ptrUARTDriver : uartDrivers) { if (strcmp(ptrUARTDriver->getDeviceID(), msgUARTRequest->device_id) == 0) { - WS_DEBUG_PRINTLN("[INFO, UART]: Device ID already exists on the bus, " - "disconnecting..."); deinitUARTDevice( msgUARTRequest->device_id); // Deinit the device and free resources - WS_DEBUG_PRINT("Disconnected!"); } } @@ -229,11 +218,9 @@ void ws_uart::detachUARTDevice( void ws_uart::update() { for (ws_uart_drv *ptrUARTDriver : uartDrivers) { if (ptrUARTDriver->isReady()) { - WS_DEBUG_PRINTLN("[INFO, UART]: UART driver is ready."); // Attempt to poll the UART driver for new data if (ptrUARTDriver->read_data()) { // Send UART driver's data to IO - WS_DEBUG_PRINTLN("[INFO, UART]: UART driver has new data."); ptrUARTDriver->send_data(); } }