parent
f1a2f8936e
commit
d963fa1da7
|
|
@ -18,18 +18,18 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
|
|
||||||
- name: Setup Arduino CLI
|
- name: Setup Arduino CLI
|
||||||
uses: arduino/setup-arduino-cli@v2
|
uses: arduino/setup-arduino-cli@v2
|
||||||
|
|
||||||
- name: Install ESP32 core
|
- name: Install ESP32 core
|
||||||
run: |
|
run: |
|
||||||
arduino-cli core update-index
|
arduino-cli core update-index > /dev/null
|
||||||
arduino-cli core install esp32:esp32
|
arduino-cli core install esp32:esp32 > /dev/null
|
||||||
|
|
||||||
- name: Arduino Lint
|
- name: Arduino Lint
|
||||||
uses: arduino/arduino-lint-action@v1
|
uses: arduino/arduino-lint-action@v2
|
||||||
with:
|
with:
|
||||||
path: ${{ github.workspace }}
|
path: ${{ github.workspace }}
|
||||||
compliance: strict
|
compliance: strict
|
||||||
|
|
@ -40,13 +40,14 @@ jobs:
|
||||||
# Compilation Test
|
# Compilation Test
|
||||||
# ============================================================================
|
# ============================================================================
|
||||||
compile-test:
|
compile-test:
|
||||||
name: 'Compile Example Sketch'
|
name: 'Compile Example Sketches'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
example:
|
examples:
|
||||||
- "examples/dshot300/dshot300.ino"
|
- "examples/dshot300/dshot300.ino"
|
||||||
- "examples/command_manager/command_manager.ino"
|
- "examples/command_manager/command_manager.ino"
|
||||||
build-flags:
|
build-flags:
|
||||||
|
|
@ -55,23 +56,21 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
|
|
||||||
- name: Setup Arduino CLI
|
- name: Compile Example Sketches
|
||||||
uses: arduino/setup-arduino-cli@v2
|
uses: arduino/compile-sketches@v1
|
||||||
|
with:
|
||||||
- name: Install ESP32 core
|
fqbn: esp32:esp32:esp32
|
||||||
run: |
|
platforms: |
|
||||||
arduino-cli core update-index
|
- name: esp32:esp32
|
||||||
arduino-cli core install esp32:esp32
|
source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
|
||||||
|
libraries: |
|
||||||
- name: Install Repo as Library
|
# Install the library from the local path.
|
||||||
run: |
|
- source-path: ./
|
||||||
mkdir -p $HOME/Arduino/libraries
|
sketch-paths: ${{ matrix.examples}}
|
||||||
ln -s $PWD $HOME/Arduino/libraries/DShotRMT
|
cli-compile-flags: |
|
||||||
|
- --warnings="none"
|
||||||
- name: Compile Example (${{ matrix.build-flags.name }})
|
|
||||||
run: arduino-cli compile --fqbn esp32:esp32:esp32 ${{ matrix.example }}
|
|
||||||
|
|
||||||
# ============================================================================
|
# ============================================================================
|
||||||
# Static Code Analysis
|
# Static Code Analysis
|
||||||
|
|
@ -83,15 +82,15 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
|
|
||||||
- name: Setup Arduino CLI
|
- name: Setup Arduino CLI
|
||||||
uses: arduino/setup-arduino-cli@v2
|
uses: arduino/setup-arduino-cli@v2
|
||||||
|
|
||||||
- name: Install ESP32 core
|
- name: Install ESP32 core
|
||||||
run: |
|
run: |
|
||||||
arduino-cli core update-index
|
arduino-cli core update-index > /dev/null
|
||||||
arduino-cli core install esp32:esp32
|
arduino-cli core install esp32:esp32 > /dev/null
|
||||||
|
|
||||||
- name: Install Cppcheck
|
- name: Install Cppcheck
|
||||||
run: sudo apt-get update && sudo apt-get install -y cppcheck
|
run: sudo apt-get update && sudo apt-get install -y cppcheck
|
||||||
|
|
|
||||||
|
|
@ -182,7 +182,7 @@ dshot_result_t DShotRMT::_initRXChannel()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Callback for RMT RX
|
// 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<DShotRMT *>(user_data);
|
DShotRMT *instance = static_cast<DShotRMT *>(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)
|
// 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);
|
_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
|
// 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();
|
uint64_t current_time = esp_timer_get_time();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue