From d963fa1da77246eee7606aa5ddabf07450739909 Mon Sep 17 00:00:00 2001 From: Wastl Kraus Date: Tue, 9 Sep 2025 09:59:49 +0200 Subject: [PATCH] Update ci.yml ...fix warnings and update action versions --- .github/workflows/ci.yml | 49 ++++++++++++++++++++-------------------- DShotRMT.cpp | 6 ++--- 2 files changed, 27 insertions(+), 28 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 73dbec6..fdecb41 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,18 +18,18 @@ jobs: steps: - name: Checkout Repository - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Setup Arduino CLI uses: arduino/setup-arduino-cli@v2 - name: Install ESP32 core run: | - arduino-cli core update-index - arduino-cli core install esp32:esp32 + arduino-cli core update-index > /dev/null + arduino-cli core install esp32:esp32 > /dev/null - name: Arduino Lint - uses: arduino/arduino-lint-action@v1 + uses: arduino/arduino-lint-action@v2 with: path: ${{ github.workspace }} compliance: strict @@ -40,13 +40,14 @@ jobs: # Compilation Test # ============================================================================ compile-test: - name: 'Compile Example Sketch' + name: 'Compile Example Sketches' runs-on: ubuntu-latest timeout-minutes: 15 + strategy: fail-fast: false matrix: - example: + examples: - "examples/dshot300/dshot300.ino" - "examples/command_manager/command_manager.ino" build-flags: @@ -55,23 +56,21 @@ jobs: steps: - name: Checkout Repository - uses: actions/checkout@v4 + uses: actions/checkout@v5 - - name: Setup Arduino CLI - uses: arduino/setup-arduino-cli@v2 - - - name: Install ESP32 core - run: | - arduino-cli core update-index - arduino-cli core install esp32:esp32 - - - name: Install Repo as Library - run: | - mkdir -p $HOME/Arduino/libraries - ln -s $PWD $HOME/Arduino/libraries/DShotRMT - - - name: Compile Example (${{ matrix.build-flags.name }}) - run: arduino-cli compile --fqbn esp32:esp32:esp32 ${{ matrix.example }} + - name: Compile Example Sketches + uses: arduino/compile-sketches@v1 + with: + fqbn: esp32:esp32:esp32 + platforms: | + - name: esp32:esp32 + source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json + libraries: | + # Install the library from the local path. + - source-path: ./ + sketch-paths: ${{ matrix.examples}} + cli-compile-flags: | + - --warnings="none" # ============================================================================ # Static Code Analysis @@ -83,15 +82,15 @@ jobs: steps: - name: Checkout Repository - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Setup Arduino CLI uses: arduino/setup-arduino-cli@v2 - name: Install ESP32 core run: | - arduino-cli core update-index - arduino-cli core install esp32:esp32 + arduino-cli core update-index > /dev/null + arduino-cli core install esp32:esp32 > /dev/null - name: Install Cppcheck run: sudo apt-get update && sudo apt-get install -y cppcheck diff --git a/DShotRMT.cpp b/DShotRMT.cpp index edcbd13..04331f3 100644 --- a/DShotRMT.cpp +++ b/DShotRMT.cpp @@ -182,7 +182,7 @@ dshot_result_t DShotRMT::_initRXChannel() } // Callback for RMT RX -bool IRAM_ATTR DShotRMT::_rmt_rx_done_callback(rmt_channel_handle_t rmt_rx_channel, const rmt_rx_done_event_data_t *edata, void *user_data) +bool DShotRMT::_rmt_rx_done_callback(rmt_channel_handle_t rmt_rx_channel, const rmt_rx_done_event_data_t *edata, void *user_data) { DShotRMT *instance = static_cast(user_data); @@ -414,7 +414,7 @@ dshot_result_t DShotRMT::_sendDShotFrame(const dshot_packet_t &packet) } // Encode DShot packet into RMT symbol format (placed in IRAM for performance) -bool IRAM_ATTR DShotRMT::_encodeDShotFrame(const dshot_packet_t &packet, rmt_symbol_word_t *symbols) +bool DShotRMT::_encodeDShotFrame(const dshot_packet_t &packet, rmt_symbol_word_t *symbols) { _parsed_packet = _parseDShotPacket(packet); @@ -482,7 +482,7 @@ uint16_t DShotRMT::_decodeDShotFrame(const rmt_symbol_word_t *symbols) } // Check if enough time has passed for next transmission -bool IRAM_ATTR DShotRMT::_timer_signal() +bool DShotRMT::_timer_signal() { uint64_t current_time = esp_timer_get_time();