Skip to content

Commit

Permalink
Store ticket period as unsigned long. The usage of the library was li…
Browse files Browse the repository at this point in the history
…mited due to this
  • Loading branch information
vzahradnik committed Oct 14, 2020
1 parent 3bceb07 commit f76d1a7
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Ticker",
"version": "1.0.1",
"version": "1.0.2",
"keywords": "arduino, timing, multitasking, non-blocking",
"description": "A library for creating Tickers, which will notify user that a given period has elapsed. Replaces delay() and allows users to write non-blocking code.",
"license": "Apache-2.0",
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=SimpleTicker
version=1.0.1
version=1.0.2
author=JSC electronics
maintainer=JSC electronics, development@jsce.cz
sentence=A library for creating Tickers, which will notify user that a given period has elapsed. Replaces delay() and allows users to write non-blocking code.
Expand Down
2 changes: 1 addition & 1 deletion src/Ticker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

#include "Ticker.h"

jsc::Ticker::Ticker(uint16_t tickerTime): tickerTime(tickerTime) {
jsc::Ticker::Ticker(unsigned long tickerTime): tickerTime(tickerTime) {
}

uint16_t jsc::Ticker::perform() {
Expand Down
4 changes: 2 additions & 2 deletions src/Ticker.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ namespace jsc {
* Default constructor. You can specify a custom ticker period.
* If it's not specified, <code>DEFAULT_TICKER_PERIOD_MS</code> will be used.
*/
Ticker(uint16_t tickerTime = DEFAULT_TICKER_PERIOD_MS);
Ticker(unsigned long tickerTime = DEFAULT_TICKER_PERIOD_MS);

/**
* Captures current time and tracks whether a time period has elapsed.
Expand All @@ -60,7 +60,7 @@ namespace jsc {

private:
/** Ticker period for one tick. After this value elapses, Ticker increments its counter.*/
uint16_t tickerTime;
unsigned long tickerTime;
unsigned long timeSample = 0;

/**
Expand Down

0 comments on commit f76d1a7

Please sign in to comment.