Arduino
Arduino copied to clipboard
[Breaking] New polledtimeout
Fixes #7903
This PR restructures the polledtimeout code by separating the templates from the policies, which makes it easier for users to understand how to extend the code with new custom policies. It also separates* the generic policies that should be common to all Arduino cores from the policies that are specific to the esp8266.
The namespaces and template name have been changed to uppercase based on multiple feedback received since the frist version was implemented.
As usual, the specifics are up for discussion.
- Restructure polledtimeout
- simplify namespaces
- rename across code
-
- new methods remaining(), elapsed(), getters
Thanks ! Is it a strong breaking change or do you plan to add something like this, for users who would have made the effort to use it ?
namespace esp8266
{
using polledTimeout = ::PolledTimeout [[ deprecated, "use PolledTimeout instead of esp8266::polledTimeout" ]];
}
This fixes #7903
Is it a strong breaking change or do you plan to add something like this, for users who would have made the effort to use it ?
namespace esp8266 { using polledTimeout = ::PolledTimeout [[ deprecated, "use PolledTimeout instead of esp8266::polledTimeout" ]]; }
I intend this to be a strong breaking change. I don't want the legacy naming to be dragged into the future.
@devyte The copyright header is AWOL in PolledTimeout.h, the three newly added files seem OK in this regard.