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

[driver] gray-code decoder for STM32 Timer #775

Merged
merged 4 commits into from
Nov 15, 2021

Conversation

TomSaw
Copy link
Contributor

@TomSaw TomSaw commented Nov 6, 2021

Added driver:encoder_input using a STM32 Timer. It has the same interface like from my first contribution modm:driver:encoder_input.bitbang

I've also extended the Timer HAL and added a shorthand for setting the input filter.

TODO

  • Finish up encoder_input.md
  • Add example

@TomSaw TomSaw force-pushed the feature/stm32-timer_encoder_input branch 8 times, most recently from 377bf08 to 39d91e6 Compare November 6, 2021 14:24
Copy link
Member

@salkinium salkinium left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, I love it!

src/modm/driver/encoder/encoder_input.lb Outdated Show resolved Hide resolved
@TomSaw TomSaw force-pushed the feature/stm32-timer_encoder_input branch from 4bd7f1b to eb20a9a Compare November 12, 2021 10:07
@TomSaw
Copy link
Contributor Author

TomSaw commented Nov 12, 2021

Done!
Examples added and improved and also gave some touches to encoder_input.bitbang

@TomSaw TomSaw force-pushed the feature/stm32-timer_encoder_input branch from eb20a9a to 4e2da59 Compare November 12, 2021 10:30
@TomSaw TomSaw force-pushed the feature/stm32-timer_encoder_input branch from 4e2da59 to bebe3f3 Compare November 12, 2021 10:45
Copy link
Member

@salkinium salkinium left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent!

@TomSaw
Copy link
Contributor Author

TomSaw commented Nov 12, 2021

Im also in the mood to proceed with fragment & PR #665 ... ->Have studied git rebase in the meanwhile 😇 - otherwise i'll get crazy with these 13k lines of changes, haha

@salkinium
Copy link
Member

scons: building terminated because of errors.main.cpp: In function 'int main()':
main.cpp:62:21: error: 'class modm::BitBangEncoderInput<modm::platform::GpioStatic<modm::platform::detail::DataB3>, modm::platform::GpioStatic<modm::platform::detail::DataB4>, 4>' has no member named 'getIncrement'
   62 |    value += encoder.getIncrement();
      |                     ^~~~~~~~~~~~
scons: *** [build/scons-release/main.o] Error 1

@salkinium
Copy link
Member

Im also in the mood to proceed

Yes please. I'm writing my master's thesis, so if I don't respond in timely fashion, just @ poke me again.

@TomSaw
Copy link
Contributor Author

TomSaw commented Nov 14, 2021

Please check this this CI error @salkinium . not my fault i think.

@salkinium
Copy link
Member

It's a bug in the AVR example: encoder.getIncrement(); vs encoder.getDelta();

@TomSaw TomSaw force-pushed the feature/stm32-timer_encoder_input branch from bebe3f3 to 239b556 Compare November 15, 2021 08:23
@TomSaw TomSaw force-pushed the feature/stm32-timer_encoder_input branch from 239b556 to d46c09d Compare November 15, 2021 08:54
Copy link
Member

@salkinium salkinium left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@salkinium salkinium merged commit d46c09d into modm-io:develop Nov 15, 2021
@TomSaw TomSaw deleted the feature/stm32-timer_encoder_input branch November 15, 2021 12:19
@salkinium salkinium added this to the 2021q4 milestone Dec 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants