Skip to content

Commit

Permalink
fix #66
Browse files Browse the repository at this point in the history
  • Loading branch information
RobTillaart committed Oct 5, 2024
1 parent e1475f8 commit 6b23449
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 11 deletions.
12 changes: 7 additions & 5 deletions AS5600.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ class AS5600
AS5600(TwoWire *wire = &Wire);

bool begin(uint8_t directionPin = AS5600_SW_DIRECTION_PIN);
bool isConnected();
// made virtual, see #66
virtual bool isConnected();

// address = fixed 0x36 for AS5600,
// = default 0x40 for AS5600L
Expand Down Expand Up @@ -237,10 +238,11 @@ class AS5600


protected:
uint8_t readReg(uint8_t reg);
uint16_t readReg2(uint8_t reg);
uint8_t writeReg(uint8_t reg, uint8_t value);
uint8_t writeReg2(uint8_t reg, uint16_t value);
// made virtual, see #66
virtual uint8_t readReg(uint8_t reg);
virtual uint16_t readReg2(uint8_t reg);
virtual uint8_t writeReg(uint8_t reg, uint8_t value);
virtual uint8_t writeReg2(uint8_t reg, uint16_t value);

uint8_t _address = AS5600_DEFAULT_ADDRESS;
uint8_t _directionPin = 255;
Expand Down
11 changes: 6 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/).


## [0.6.2] - 2024-10-04
- Fix #65, make **getCumulativePosition()** direction aware.
- optimize **readAngle()** and **rawAngle()**
- fix negative values in **getRevolutions()**
- fix #65, make **getCumulativePosition()** direction aware.
- optimize **readAngle()** and **rawAngle()**.
- fix negative values in **getRevolutions()**.
- fix #66, make I2C functions virtual to improve derived class.
- fix **setOffset()** to not set offset to 360.
- add unit test for offset -0.01 and 360.0 (both should become 0.0).
- add **AS5600_output_speedtest.ino**, thanks to Pollyscracker
- update readme.md
- add **AS5600_output_speedtest.ino**, thanks to Pollyscracker.
- update readme.md.


## [0.6.1] - 2024-03-31
Expand Down
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,16 @@ or fluctuating power supply.
Please share your experiences.


### 0.6.2 bug fixes.

Version 0.6.2 fixes bugs that might affect your code.

- fix **getCumulativePosition()** to make it direction aware.
- fix negative values in **getRevolutions()**.
- fix **setOffset()** to not set offset to 360 degrees.
- fix #66, make I2C functions virtual.


### 0.5.0 Breaking change

Version 0.5.0 introduced a breaking change.
Expand Down Expand Up @@ -729,7 +739,7 @@ priority is relative.

#### Must

- re-organize readme
- re-organize readme.md
- rename revolution functions
- to what?

Expand Down

0 comments on commit 6b23449

Please sign in to comment.