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

Example sketch TickerParameter.ino implementation doesn't match its comments #9203

Open
4 of 6 tasks
Astro-Johnny opened this issue Oct 31, 2024 · 1 comment
Open
4 of 6 tasks

Comments

@Astro-Johnny
Copy link

Basic Infos

  • This issue complies with the issue POLICY doc.
  • I have read the documentation at readthedocs and the issue is not addressed there.
  • I have tested that the issue is present in current master branch (aka latest git).
  • I have searched the issue tracker for a similar issue.
  • If there is a stack dump, I have decoded it.
  • I have filled out all fields below.

Platform

n/a

Settings in IDE

n/a

Problem Description

The example sketch TickerParameter.ino

says in comment:

This sample runs two tickers that both call one callback function, but with different arguments.

However, implementations used three Ticker instances. A callback function with a parameter is used on one of them but always with same parameter. I suspect this example may have been left in a work-in-progress state and never completed.

@Astro-Johnny
Copy link
Author

Potential typo on line 45 too:

// every 54 ms, call setPinChar(1)
tickerSetChar.attach_ms(26, setPinChar, (char)1);

says "54 ms" but passes 26 to attach_ms().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant