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/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!
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/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
diff --git a/README.md b/README.md
index 575bdc4..73c6be1 100644
--- a/README.md
+++ b/README.md
@@ -1,8 +1,7 @@
# Tic Stepper Motor Controller library for Arduino
-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)
+Version: 2.1.1
+Release date: 2021-06-22
[www.pololu.com](https://www.pololu.com/)
## Summary
@@ -76,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".
@@ -126,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/Tic.cpp b/Tic.cpp
index 50f1881..e62d953 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 533e4e4..8bc1edc 100644
--- a/Tic.h
+++ b/Tic.h
@@ -1419,7 +1419,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.
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