Closed tomvanbraeckel closed 3 months ago
This is a good idea but instead of the #ifdef ESP_PLATFORM in the function I think we should add a retro-go constant to represent the OS' tick rate. This would allow the target to specify its own or the developer to override it at build time. Plus we might want to know the tick rate in other functions in the future.
Not sure what to call it, RG_TICK_RATE, RG_TICKRATE, RG_HZ? Or even as a time unit, RG_TICK_MS, RG_TICK_US?
I'll just merge it now and add the constant later, no point in waiting until a constant name is decided.
The value of CONFIG_FREERTOS_HZ defaults to 100 on ESP but can be changed in the esp-idf configuration.
This minor improvement uses CONFIG_FREERTOS_HZ on ESP, instead of a hard-coded value.