Closed vortigont closed 2 years ago
Tried this approach - does not work...
Scheduler_example00_Blink:46:1: error: 'Scheduler' does not name a type
46 | Scheduler ts;
| ^~~~~~~~~
Scheduler_example00_Blink:54:76: error: 'ts' was not declared in this scope
54 | Task tBlink1 ( PERIOD1 * TASK_MILLISECOND, DURATION / PERIOD1, &blink1CB, &ts, true );
| ^~
Scheduler_example00_Blink:62:79: error: 'ts' was not declared in this scope
62 | Task tBlink2 ( PERIOD2 * TASK_MILLISECOND, DURATION / PERIOD2, &blink2CB_ON, &ts, false );
Well, take it back: Declaring scheduler like this:
// Scheduler
TS::Scheduler ts;
works actually.
So yes, this is a good workaround - thank you @vortigont !
Pushed my version 3.6.2 with this update to the testing branch. Thanks again.
The question is - should I go for even more safe: tsScheduler tsTask tsStatusRequest ?
The question is - should I go for even more safe: tsScheduler tsTask tsStatusRequest
IMO - I do not like it, class names are usually starts with capital. Better provide an example to use full namespace prefix TS::Task
, it gives the idea where the alias comes from.
suggesting a feasible workaround for #145 a simple wrapper namespace and class aliases to be used with frameworks having clashing class names. This could also be done in user code, but better to have an example available in the library.
Closes #145