Skip to content

Commit

Permalink
Merge branch 'pololu:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
rgiese authored Dec 19, 2023
2 parents b519bee + fa3f105 commit ad874df
Show file tree
Hide file tree
Showing 12 changed files with 64 additions and 42 deletions.
2 changes: 2 additions & 0 deletions .arduino-ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
library_archives:
- Pushbutton=https://github.com/pololu/pushbutton-arduino/archive/2.0.0.tar.gz=10h6ls1vbzvq0542s1qd75xgz4g5amg8s6qvw6dvq554y1krwkv0
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report-or-feature-request.md
Original file line number Diff line number Diff line change
@@ -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: ''

---


5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -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!
19 changes: 19 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: "CI"
on:
pull_request:
push:
jobs:
ci:
runs-on: ubuntu-20.04
steps:
- name: Checkout this repository
uses: actions/[email protected]
- name: Cache for arduino-ci
uses: actions/[email protected]
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"
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/docs
/docs/
/out/
11 changes: 11 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -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"
25 changes: 0 additions & 25 deletions .travis.yml

This file was deleted.

5 changes: 1 addition & 4 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# Tic Stepper Motor Controller library for Arduino

Version: 2.1.0<br>
Release date: 2019-09-16<br>
[![Build Status](https://travis-ci.org/pololu/tic-arduino.svg?branch=master)](https://travis-ci.org/pololu/tic-arduino)<br>
Version: 2.1.1<br>
Release date: 2021-06-22<br>
[www.pololu.com](https://www.pololu.com/)

## Summary
Expand Down Expand Up @@ -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".

Expand Down Expand Up @@ -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):
Expand Down
12 changes: 6 additions & 6 deletions Tic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -187,18 +187,18 @@ 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();
}

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();
}

Expand Down
2 changes: 1 addition & 1 deletion Tic.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=Tic
version=2.1.0
version=2.1.1
author=Pololu
maintainer=Pololu <[email protected]>
sentence=Tic Stepper Motor Controller library for Arduino
Expand Down

0 comments on commit ad874df

Please sign in to comment.