From 91a54e7ebd6dfaa5897510b6dae2c4d84b448adf Mon Sep 17 00:00:00 2001 From: "RyanTM (Pololu)" Date: Thu, 17 Dec 2020 11:46:24 -0800 Subject: [PATCH 1/6] travis to arduino-ci --- .arduino-ci.yaml | 2 ++ .github/workflows/ci.yaml | 19 +++++++++++++++++++ .gitignore | 3 ++- .gitlab-ci.yml | 11 +++++++++++ .travis.yml | 25 ------------------------- README.md | 1 - 6 files changed, 34 insertions(+), 27 deletions(-) create mode 100644 .arduino-ci.yaml create mode 100644 .github/workflows/ci.yaml create mode 100644 .gitlab-ci.yml delete mode 100644 .travis.yml diff --git a/.arduino-ci.yaml b/.arduino-ci.yaml new file mode 100644 index 0000000..ebf2d84 --- /dev/null +++ b/.arduino-ci.yaml @@ -0,0 +1,2 @@ +library_archives: + - Pushbutton=https://github.com/pololu/pushbutton-arduino/archive/2.0.0.tar.gz=10h6ls1vbzvq0542s1qd75xgz4g5amg8s6qvw6dvq554y1krwkv0 diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..79f247e --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,19 @@ +name: "CI" +on: + pull_request: + push: +jobs: + ci: + runs-on: ubuntu-20.04 + steps: + - name: Checkout this repository + uses: actions/checkout@v2.3.4 + - name: Cache for arduino-ci + uses: actions/cache@v2.1.3 + with: + path: | + ~/.arduino15 + key: ${{ runner.os }}-arduino + - name: Install nix + uses: cachix/install-nix-action@v12 + - run: nix-shell -I nixpkgs=channel:nixpkgs-unstable -p arduino-ci --run "arduino-ci" diff --git a/.gitignore b/.gitignore index 2f88269..16b1f79 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -/docs +/docs/ +/out/ diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..0d727c7 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,11 @@ +image: $CI_REGISTRY_IMAGE/nixos/nix:2.3.6 + +stages: + - ci + +ci: + stage: ci + tags: + - nix + script: + - nix-shell -I nixpkgs=channel:nixpkgs-unstable -p arduino-ci --run "arduino-ci" diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 4dc1bb6..0000000 --- a/.travis.yml +++ /dev/null @@ -1,25 +0,0 @@ -language: python -python: - - "2.7" - -cache: - directories: - - "~/.platformio" - -install: -- pip install -U https://github.com/platformio/platformio-core/archive/develop.zip -- curl -L https://github.com/pololu/pushbutton-arduino/archive/master.tar.gz | tar xz -C /tmp - -env: -- BOARD=leonardo -- BOARD=micro -- BOARD=megaatmega2560 -- BOARD=due -- BOARD=uno -- BOARD=yun - -script: -- set -eo pipefail; -- for e in examples/*; do - platformio ci --board=$BOARD --lib=. --lib=/tmp/pushbutton-arduino-master $e/*; - done diff --git a/README.md b/README.md index 575bdc4..e75aef9 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,6 @@ Version: 2.1.0
Release date: 2019-09-16
-[![Build Status](https://travis-ci.org/pololu/tic-arduino.svg?branch=master)](https://travis-ci.org/pololu/tic-arduino)
[www.pololu.com](https://www.pololu.com/) ## Summary From e620a230133cb7b9a681f29c46945bd5738785bb Mon Sep 17 00:00:00 2001 From: "RyanTM (Pololu)" Date: Thu, 17 Dec 2020 11:46:32 -0800 Subject: [PATCH 2/6] fix license format --- LICENSE.txt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/LICENSE.txt b/LICENSE.txt index 714d2d1..cb3ac05 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,7 +1,4 @@ -Copyright (c) 2017 Pololu Corporation. For more information, see - -http://www.pololu.com/ -http://forum.pololu.com/ +Copyright (c) 2017-2020 Pololu Corporation (www.pololu.com) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation From ba2ac8185650cb6fcb33e611b68f74cd80c1e1fb Mon Sep 17 00:00:00 2001 From: "RyanTM (Pololu)" Date: Thu, 17 Dec 2020 11:47:01 -0800 Subject: [PATCH 3/6] add GitHub issue template --- .../ISSUE_TEMPLATE/bug-report-or-feature-request.md | 11 +++++++++++ .github/ISSUE_TEMPLATE/config.yml | 5 +++++ 2 files changed, 16 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug-report-or-feature-request.md create mode 100644 .github/ISSUE_TEMPLATE/config.yml diff --git a/.github/ISSUE_TEMPLATE/bug-report-or-feature-request.md b/.github/ISSUE_TEMPLATE/bug-report-or-feature-request.md new file mode 100644 index 0000000..5add2f8 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-report-or-feature-request.md @@ -0,0 +1,11 @@ +--- +name: Bug report or feature request +about: Did you find a specific bug in the code for this project? Do you want to request + a new feature? Please open an issue! +title: '' +labels: '' +assignees: '' + +--- + + diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..8625efe --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: false +contact_links: + - name: Pololu Forum + url: https://forum.pololu.com/ + about: Do you need help getting started? Can't get this code to work at all? Having problems with electronics? Please post on our forum! From 5474dc314b6a7e32d719c889ba79eb3627a940df Mon Sep 17 00:00:00 2001 From: "David (Pololu)" Date: Tue, 22 Jun 2021 12:10:10 -0700 Subject: [PATCH 4/6] Only pass arguments of type uint8_t to the Arduino write function. This fixes a compilation error in the Arduino mbed core, where Wire.write(uint32_t) is ambiguous: https://forum.pololu.com/t/tic-arduino-library-not-working-on-arduino-nano-33-ble/21695 It also makes future overload resolution problems less likely. --- Tic.cpp | 12 ++++++------ Tic.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Tic.cpp b/Tic.cpp index 9f22625..cfff1fb 100644 --- a/Tic.cpp +++ b/Tic.cpp @@ -167,7 +167,7 @@ void TicSerial::sendCommandHeader(TicCommand cmd) else { // Pololu protocol - _stream->write(0xAA); + _stream->write((uint8_t)0xAA); serialW7(_deviceNumber); serialW7((uint8_t)cmd); } @@ -187,10 +187,10 @@ void TicI2C::commandW32(TicCommand cmd, uint32_t val) { Wire.beginTransmission(_address); Wire.write((uint8_t)cmd); - Wire.write(val >> 0); // lowest byte - Wire.write(val >> 8); - Wire.write(val >> 16); - Wire.write(val >> 24); // highest byte + Wire.write((uint8_t)(val >> 0)); // lowest byte + Wire.write((uint8_t)(val >> 8)); + Wire.write((uint8_t)(val >> 16)); + Wire.write((uint8_t)(val >> 24)); // highest byte _lastError = Wire.endTransmission(); } @@ -198,7 +198,7 @@ void TicI2C::commandW7(TicCommand cmd, uint8_t val) { Wire.beginTransmission(_address); Wire.write((uint8_t)cmd); - Wire.write(val & 0x7F); + Wire.write((uint8_t)(val & 0x7F)); _lastError = Wire.endTransmission(); } diff --git a/Tic.h b/Tic.h index 5c53239..69ea833 100644 --- a/Tic.h +++ b/Tic.h @@ -1411,7 +1411,7 @@ class TicSerial : public TicBase uint8_t length, void * buffer); void sendCommandHeader(TicCommand cmd); - void serialW7(uint8_t val) { _stream->write(val & 0x7F); } + void serialW7(uint8_t val) { _stream->write((uint8_t)(val & 0x7F)); } }; /// Represents an I2C connection to a Tic. From 894b1e8845550a81eec7d48d7cc9fc85487210f8 Mon Sep 17 00:00:00 2001 From: "David (Pololu)" Date: Tue, 22 Jun 2021 14:02:37 -0700 Subject: [PATCH 5/6] Changed the version number to 2.1.1 and updated the README. --- README.md | 6 ++++-- library.properties | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e75aef9..543ba03 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Tic Stepper Motor Controller library for Arduino -Version: 2.1.0
-Release date: 2019-09-16
+Version: 2.1.1
+Release date: 2021-06-22
[www.pololu.com](https://www.pololu.com/) ## Summary @@ -125,6 +125,8 @@ For complete documentation of this library, see [the tic-arduino documentation][ ## Version history +* 2.1.1 (2021-06-22): + - Fixed some compilation errors and warnings. * 2.1.0 (2019-09-16): - Added support for the new [Tic 36v4][36v4]. * 2.0.0 (2019-02-06): diff --git a/library.properties b/library.properties index 730bd9a..6e6103b 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=Tic -version=2.1.0 +version=2.1.1 author=Pololu maintainer=Pololu sentence=Tic Stepper Motor Controller library for Arduino From fa3f105bc0dd6085dc3af20f55deae8178f42610 Mon Sep 17 00:00:00 2001 From: "Kevin (Pololu)" Date: Wed, 28 Jul 2021 15:11:57 -0700 Subject: [PATCH 6/6] improve library manager search instructions --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 543ba03..73c6be1 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,7 @@ You can use the Library Manager to install this library: 1. In the Arduino IDE, open the "Sketch" menu, select "Include Library", then "Manage Libraries...". -2. Search for "Tic". +2. Search for "Tic Stepper Motor Controller". 3. Click the Tic entry in the list. 4. Click "Install".