Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
RobTillaart committed Dec 7, 2023
1 parent d549470 commit 57c74c5
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- refactor API, begin()
- update readme.md
- update examples
- add examples
- patch library.properties => category=Sensors

----
Expand Down
2 changes: 1 addition & 1 deletion examples/AS5600_demo_RP2040/AS5600_demo_RP2040.ino
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ void setup()

Wire.setSDA(14);
Wire.setSCL(15);
Wire.begin()
Wire.begin();

as5600.begin(4); // set direction pin.
as5600.setDirection(AS5600_CLOCK_WISE); // default, just be explicit.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ void setup()

Wire.begin(14, 15); // ESP32

as5600.begin():
as5600.begin();
as5600.setAddress(0x40); // AS5600L has address

as5600.setDirection(AS5600_CLOCK_WISE); // default, just be explicit.
Expand Down
16 changes: 15 additions & 1 deletion test/unit_test_001.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ unittest(test_constants_configuration)
unittest(test_constructor)
{
AS5600 as5600;

Wire.begin();

as5600.begin(4);
assertTrue(as5600.isConnected()); // keep CI happy

Expand All @@ -123,6 +126,9 @@ unittest(test_constructor)
unittest(test_address)
{
AS5600 as5600;

Wire.begin();

as5600.begin(4);
assertEqual(0x36, as5600.getAddress());

Expand All @@ -140,6 +146,8 @@ unittest(test_hardware_direction)
{
AS5600 as5600;

Wire.begin();

as5600.begin(4);
assertEqual(AS5600_CLOCK_WISE, as5600.getDirection());

Expand All @@ -158,6 +166,8 @@ unittest(test_software_direction)
{
AS5600 as5600;

Wire.begin();

as5600.begin(255);
assertEqual(AS5600_CLOCK_WISE, as5600.getDirection());

Expand All @@ -176,6 +186,8 @@ unittest(test_offset)
{
AS5600 as5600;

Wire.begin();

as5600.begin();

for (int of = 0; of < 360; of += 40)
Expand All @@ -202,6 +214,8 @@ unittest(test_failing_set_commands)
{
AS5600 as5600;

Wire.begin();

as5600.begin();

assertFalse(as5600.setZPosition(4096));
Expand All @@ -219,7 +233,7 @@ unittest(test_failing_set_commands)
}


// FOR REMAINING ONE NEED A STUB
// FOR REMAINING ONE NEED A STUB


unittest_main()
Expand Down

0 comments on commit 57c74c5

Please sign in to comment.