[TaskScheduler] Fix timing if scheduler is disabled
Let's assume that, when the SensorManager class is instantiated, it initializes the sensors and prepares the various SensorSamplers by adding them to the scheduler and, when tasks are added to the TaskScheduler, it is necessary to specify the tick at which they start working.
The problem is that if the TaskScheduler is not activated immediately, all the tasks that should be executed between the tick at which they must start and the moment in which the scheduler is started, are executed in cascade to recover the lost time (the same problem is encountered if the scheduler is blocked and then reactivated).
I ran into this problem because I was start sampling the sensors (and therefore the scheduler) only when the user wants.
In the image you can see the SPI transactions between the STM and the sensor, initially they go in succession and as soon as it has recovered they begin to be carried out correctly.
P.S. There's a thread on Slack, check it out for more info