Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type casting bug in STM32HWEncoder fixed #52

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/encoders/stm32hwencoder/STM32HWEncoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/*
HardwareEncoder(int cpr)
*/
STM32HWEncoder::STM32HWEncoder(unsigned int _ppr, int8_t pinA, int8_t pinB, int8_t pinI) {
STM32HWEncoder::STM32HWEncoder(unsigned int _ppr, int pinA, int pinB, int pinI) {
cpr = _ppr * 4; // 4x for quadrature
_pinA = digitalPinToPinName(pinA);
_pinB = digitalPinToPinName(pinB);
Expand Down
2 changes: 1 addition & 1 deletion src/encoders/stm32hwencoder/STM32HWEncoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class STM32HWEncoder : public Sensor {
Encoder class constructor
@param ppr impulses per rotation (cpr=ppr*4)
*/
explicit STM32HWEncoder(unsigned int ppr, int8_t pinA, int8_t pinB, int8_t pinI=-1);
explicit STM32HWEncoder(unsigned int ppr, int pinA, int pinB, int pinI=-1);

void init() override;
int needsSearch() override;
Expand Down
Loading