Skip to content

Commit

Permalink
Update ESP32Encoder.cpp: cb function data pointer (#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
ztjona authored Feb 29, 2024
1 parent 591324a commit 6640a03
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/ESP32Encoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ ESP32Encoder::ESP32Encoder(bool always_interrupt_, enc_isr_cb_t enc_isr_cb, void
direction{false},
working{false}
{
if (enc_isr_cb_data == nullptr)
{
_enc_isr_cb_data = this;
}
}

ESP32Encoder::~ESP32Encoder() {}
Expand Down

0 comments on commit 6640a03

Please sign in to comment.