esp8266 / Arduino

ESP8266 core for Arduino
GNU Lesser General Public License v2.1
16.09k stars 13.33k forks source link

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

Open Astro-Johnny opened 3 weeks ago

Astro-Johnny commented 3 weeks ago

Basic Infos

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 commented 3 weeks ago

Potential typo on line 45 too:

https://github.com/esp8266/Arduino/blob/19b7a29720a6f2c95d06e2ea4baa335dcf32e68f/libraries/Ticker/examples/TickerParameter/TickerParameter.ino#L45-L46

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