diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..03600dd --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,10 @@ +# See: https://docs.github.com/en/github/administering-a-repository/configuration-options-for-dependency-updates#about-the-dependabotyml-file +version: 2 + +updates: + # Configure check for outdated GitHub Actions actions in workflows. + # See: https://docs.github.com/en/github/administering-a-repository/keeping-your-actions-up-to-date-with-dependabot + - package-ecosystem: github-actions + directory: / # Check the repository's workflows under /.github/workflows/ + schedule: + interval: daily diff --git a/.github/workflows/check-arduino.yml b/.github/workflows/check-arduino.yml new file mode 100644 index 0000000..0d969f6 --- /dev/null +++ b/.github/workflows/check-arduino.yml @@ -0,0 +1,28 @@ +name: Check Arduino + +# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows +on: + push: + pull_request: + schedule: + # Run every Tuesday at 8 AM UTC to catch breakage caused by new rules added to Arduino Lint. + - cron: "0 8 * * TUE" + workflow_dispatch: + repository_dispatch: + +jobs: + lint: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Arduino Lint + uses: arduino/arduino-lint-action@v1 + with: + compliance: specification + library-manager: update + # Always use this setting for official repositories. Remove for 3rd party projects. + official: true + project-type: library diff --git a/.github/workflows/compile-examples.yml b/.github/workflows/compile-examples.yml new file mode 100644 index 0000000..52774c2 --- /dev/null +++ b/.github/workflows/compile-examples.yml @@ -0,0 +1,67 @@ +name: Compile Examples + +# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows +on: + push: + paths: + - ".github/workflows/compile-examples.yml" + - "examples/**" + - "src/**" + pull_request: + paths: + - ".github/workflows/compile-examples.yml" + - "examples/**" + - "src/**" + schedule: + # Run every Tuesday at 8 AM UTC to catch breakage caused by changes to external resources (libraries, platforms). + - cron: "0 8 * * TUE" + workflow_dispatch: + repository_dispatch: + +jobs: + build: + name: ${{ matrix.board.fqbn }} + runs-on: ubuntu-latest + + env: + SKETCHES_REPORTS_PATH: sketches-reports + + strategy: + fail-fast: false + + matrix: + board: + - fqbn: arduino:avr:uno + platforms: | + - name: arduino:avr + - fqbn: arduino:avr:mega + platforms: | + - name: arduino:avr + - fqbn: arduino:avr:leonardo + platforms: | + - name: arduino:avr + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Compile examples + uses: arduino/compile-sketches@v1 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + fqbn: ${{ matrix.board.fqbn }} + platforms: ${{ matrix.board.platforms }} + libraries: | + # Install the library from the local path. + - source-path: ./ + sketch-paths: | + - examples + enable-deltas-report: true + sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }} + + - name: Save sketches report as workflow artifact + uses: actions/upload-artifact@v2 + with: + if-no-files-found: error + path: ${{ env.SKETCHES_REPORTS_PATH }} + name: ${{ env.SKETCHES_REPORTS_PATH }} diff --git a/.github/workflows/report-size-deltas.yml b/.github/workflows/report-size-deltas.yml new file mode 100644 index 0000000..652be5d --- /dev/null +++ b/.github/workflows/report-size-deltas.yml @@ -0,0 +1,24 @@ +name: Report Size Deltas + +# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows +on: + push: + paths: + - ".github/workflows/report-size-deltas.yml" + schedule: + # Run at the minimum interval allowed by GitHub Actions. + # Note: GitHub Actions periodically has outages which result in workflow failures. + # In this event, the workflows will start passing again once the service recovers. + - cron: "*/5 * * * *" + workflow_dispatch: + repository_dispatch: + +jobs: + report: + runs-on: ubuntu-latest + steps: + - name: Comment size deltas reports to PRs + uses: arduino/report-size-deltas@v1 + with: + # The name of the workflow artifact created by the sketch compilation workflow + sketches-reports-source: sketches-reports diff --git a/.github/workflows/spell-check.yml b/.github/workflows/spell-check.yml new file mode 100644 index 0000000..01bee87 --- /dev/null +++ b/.github/workflows/spell-check.yml @@ -0,0 +1,22 @@ +name: Spell Check + +# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows +on: + push: + pull_request: + schedule: + # Run every Tuesday at 8 AM UTC to catch new misspelling detections resulting from dictionary updates. + - cron: "0 8 * * TUE" + workflow_dispatch: + repository_dispatch: + +jobs: + spellcheck: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Spell check + uses: codespell-project/actions-codespell@master diff --git a/README.md b/README.md index 5c5b033..f83dbae 100755 --- a/README.md +++ b/README.md @@ -1,6 +1,11 @@ > **Note:** this library is deprecated and no longer maintained. 9 Axes Motion Library + +[![Check Arduino status](https://github.com/arduino-libraries/NineAxesMotion/actions/workflows/check-arduino.yml/badge.svg)](https://github.com/arduino-libraries/NineAxesMotion/actions/workflows/check-arduino.yml) +[![Compile Examples status](https://github.com/arduino-libraries/NineAxesMotion/actions/workflows/compile-examples.yml/badge.svg)](https://github.com/arduino-libraries/NineAxesMotion/actions/workflows/compile-examples.yml) +[![Spell Check status](https://github.com/arduino-libraries/NineAxesMotion/actions/workflows/spell-check.yml/badge.svg)](https://github.com/arduino-libraries/NineAxesMotion/actions/workflows/spell-check.yml) + ----------- The NineAxesMotion.cpp and NineAxesMotion.h files are C++ wrapper codes for the BNO055.c and BNO055.h Sensor API. The wrapper code has been designed to diff --git a/src/NineAxesMotion.cpp b/src/NineAxesMotion.cpp index 81023bc..4ccbf7e 100755 --- a/src/NineAxesMotion.cpp +++ b/src/NineAxesMotion.cpp @@ -18,7 +18,7 @@ ******************************************************************************************************************************************************** * * Fixed Wire Class, -* Changed Motion.ino example to be connected allways with the pin D2 and +* Changed Motion.ino example to be connected always with the pin D2 and * fixed the interrupt attach function * * Date: 04/26/2021 diff --git a/src/NineAxesMotion.h b/src/NineAxesMotion.h index 6f70829..252b34e 100644 --- a/src/NineAxesMotion.h +++ b/src/NineAxesMotion.h @@ -18,7 +18,7 @@ **************************************************************************** * * Fixed Wire Class, -* Changed Motion.ino example to be connected allways with the pin D2 and +* Changed Motion.ino example to be connected always with the pin D2 and * fixed the interrupt attach function * * Date: 04/26/2021 diff --git a/src/utility/BNO055.c b/src/utility/BNO055.c index cfceae3..81e4c07 100755 --- a/src/utility/BNO055.c +++ b/src/utility/BNO055.c @@ -106,7 +106,7 @@ BNO055_RETURN_FUNCTION_TYPE bno055_init(struct bno055_t *bno055) */ u_8 a_SW_ID_u_8[ARRAY_SIZE_TWO] = { BNO055_ZERO_U8X, BNO055_ZERO_U8X}; - /* stuct parameters are assign to bno055*/ + /* struct parameters are assign to bno055*/ p_bno055 = bno055; /* Write the default page as zero*/ com_rslt = p_bno055->BNO055_BUS_WRITE_FUNC diff --git a/src/utility/BNO055.h b/src/utility/BNO055.h index 7dd5c86..1e2be86 100755 --- a/src/utility/BNO055.h +++ b/src/utility/BNO055.h @@ -84,7 +84,7 @@ #ifdef __KERNEL__ #include -/* singed integer type*/ +/* signed integer type*/ typedef int8_t s_8;/**< used for signed 8bit */ typedef int16_t s_16;/**< used for signed 16bit */ typedef int32_t s_32;/**< used for signed 32bit */ @@ -4103,7 +4103,7 @@ BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_temp_celsius( double *v_temp_d); #endif /**************************************************************************/ -/**\name FUNCTIONS FOR READING ACCEL,MAG,GYRO AND SYTEM CALIBRATION STATUS*/ +/**\name FUNCTIONS FOR READING ACCEL,MAG,GYRO AND SYSTEMCALIBRATION STATUS*/ /*************************************************************************/ /*! * @brief This API used to read @@ -4162,7 +4162,7 @@ u_8 *v_gyro_calib_u_8); BNO055_RETURN_FUNCTION_TYPE bno055_get_sys_calib_stat( u_8 *v_sys_calib_u_8); /******************************************************************/ -/**\name FUNCTIONS FOR READING ACCEL,MAG,GYRO AND SYTEM SELF TEST */ +/**\name FUNCTIONS FOR READING ACCEL,MAG,GYRO AND SYSTEMSELF TEST */ /******************************************************************/ /*! * @brief This API used to read