Skip to content

Commit 1060511

Browse files
authored
add changelog.md (#5)
1 parent b5e6a4f commit 1060511

File tree

7 files changed

+81
-29
lines changed

7 files changed

+81
-29
lines changed

.arduino-ci.yml

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,29 @@
1+
platforms:
2+
rpipico:
3+
board: rp2040:rp2040:rpipico
4+
package: rp2040:rp2040
5+
gcc:
6+
features:
7+
defines:
8+
- ARDUINO_ARCH_RP2040
9+
warnings:
10+
flags:
11+
12+
packages:
13+
rp2040:rp2040:
14+
url: https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json
15+
116
compile:
217
# Choosing to run compilation tests on 2 different Arduino platforms
18+
# selected only those that work
319
platforms:
420
- uno
5-
- due
6-
- zero
7-
- leonardo
21+
# - due
22+
# - zero
23+
# - leonardo
824
- m4
925
- esp32
1026
- esp8266
11-
- mega2560
27+
# - mega2560
28+
- rpipico
29+

CHANGELOG.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Change Log rotaryDecoder
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](http://keepachangelog.com/)
6+
and this project adheres to [Semantic Versioning](http://semver.org/).
7+
8+
9+
## [0.1.3] - 2022-11-23
10+
- add changelog.md
11+
- add RP2040 to build-CI
12+
- fix version number .cpp
13+
- minor edits
14+
15+
16+
## [0.1.2] - 2021-12-27
17+
- update library.json
18+
- update readme.md
19+
- update license
20+
- minor edits
21+
22+
## [0.1.1] - 2021-11-15
23+
- update build-CI, readme.md
24+
- improve readability of code
25+
26+
## [0.1.0] - 2021-05-08
27+
- initial version
28+
29+

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,14 @@ See examples..
9595

9696
## Future
9797

98-
- test with a high speed drill like a Dremel-tool.
98+
#### must
9999
- update documentation
100100
- picture how to connect e.g 2 RE's which pins to used
101101

102+
#### should
103+
- test with a high speed drill like a Dremel-tool.
104+
105+
#### could
106+
- invert flag to adjust to RE that give their pulse just the other way around?
107+
- setInvert(bool); getInvert();
108+
- per channel / all?

library.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"type": "git",
1616
"url": "https://github.com/RobTillaart/rotaryDecoder.git"
1717
},
18-
"version": "0.1.2",
18+
"version": "0.1.3",
1919
"license": "MIT",
2020
"frameworks": "arduino",
2121
"platforms": "*",

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=rotaryDecoder
2-
version=0.1.2
2+
version=0.1.3
33
author=Rob Tillaart <[email protected]>
44
maintainer=Rob Tillaart <[email protected]>
55
sentence=Arduino library to rotary decoder with a PCF8574

rotaryDecoder.cpp

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,18 @@
11
//
22
// FILE: rotaryDecoder.cpp
33
// AUTHOR: Rob Tillaart
4-
// VERSION: 0.1.1
4+
// VERSION: 0.1.3
55
// DATE: 2021-05-08
66
// PURPOSE: rotary decoder library for Arduino
77
// URL: https://github.com/RobTillaart/rotaryDecoder
8-
//
9-
// HISTORY:
10-
// 0.1.0 2021-05-08 initial version
11-
// 0.1.1 2021-11-15 update build-CI, readme.md
12-
// improve readability of code
13-
// 0.1.2 2021-12-27 update library.json, license, minor edits
148

159

1610
#include "rotaryDecoder.h"
1711

1812

1913
/////////////////////////////////////////////////////
2014
//
21-
// CONSTRUCTORS
15+
// CONSTRUCTORS
2216
//
2317
rotaryDecoder::rotaryDecoder(const int8_t address, TwoWire *wire)
2418
{
@@ -91,7 +85,7 @@ bool rotaryDecoder::update()
9185
uint8_t change = (_lastPos[i] << 2) | currentpos;
9286
switch (change)
9387
{
94-
case 0b0001: // fall through..
88+
case 0b0001: // fall through..
9589
case 0b0111:
9690
case 0b1110:
9791
case 0b1000:
@@ -125,7 +119,7 @@ bool rotaryDecoder::updateSingle()
125119
uint8_t change = (_lastPos[i] << 2) | currentpos;
126120
switch (change)
127121
{
128-
case 0b0001: // fall through..
122+
case 0b0001: // fall through..
129123
case 0b0111:
130124
case 0b1110:
131125
case 0b1000:
@@ -150,12 +144,16 @@ bool rotaryDecoder::updateSingle()
150144
}
151145

152146

147+
/////////////////////////////////////////////////////
148+
//
149+
// PRIVATE
150+
//
153151
uint8_t rotaryDecoder::_read8()
154152
{
155153
_wire->requestFrom(_address, (uint8_t)1);
156154
return _wire->read();
157155
}
158156

159157

160-
// -- END OF FILE --
158+
// -- END OF FILE --
161159

rotaryDecoder.h

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// FILE: rotaryDecoder.h
44
// AUTHOR: Rob Tillaart
5-
// VERSION: 0.1.2
5+
// VERSION: 0.1.3
66
// DATE: 2021-05-08
77
// PURPOSE: rotary decoder library for Arduino
88
// URL: https://github.com/RobTillaart/rotaryDecoder
@@ -11,7 +11,7 @@
1111
#include "Arduino.h"
1212
#include "Wire.h"
1313

14-
#define ROTARY_DECODER_LIB_VERSION (F("0.1.2"))
14+
#define ROTARY_DECODER_LIB_VERSION (F("0.1.3"))
1515

1616

1717
class rotaryDecoder
@@ -28,20 +28,20 @@ class rotaryDecoder
2828

2929
void readInitialState();
3030

31-
// for polling version,
32-
// checkChange is bit faster than a call to update
33-
// so useful if there are only a few updates
31+
// for polling version,
32+
// checkChange is bit faster than a call to update
33+
// so useful if there are only a few updates
3434
bool checkChange();
3535

36-
// read and update the counters
37-
bool update(); // assumes two directions => +1 and -1
38-
bool updateSingle(); // assumes single direction => + ++ +++
36+
// read and update the counters
37+
bool update(); // assumes two directions => +1 and -1
38+
bool updateSingle(); // assumes single direction => + ++ +++
3939

40-
// re = rotary encoder
40+
// re = rotary encoder
4141
int32_t getValue(uint8_t re) { return _encoder[re]; };
4242
void setValue(uint8_t re, int32_t value = 0) { _encoder[re] = value; };
4343

44-
// DEBUG
44+
// DEBUG
4545
uint8_t getLastPosition(uint8_t re) { return _lastPos[re]; };
4646

4747

@@ -57,5 +57,5 @@ class rotaryDecoder
5757
};
5858

5959

60-
// -- END OF FILE --
60+
// -- END OF FILE --
6161

0 commit comments

Comments
 (0)