It might be a good idea to run the wifi and bluetooth state update routines on core 0. Currently, the run in the end loop method on core 1, and take up some of core 1's processor time. If the routines run on core 0, they can run independent of core 1, and if core 1 is busy (eg: music player) the wifi and bluetooth states can still be updated. This might cause issues with wifi and bluetooth, because their tasks will have to share processor time with the state tasks.
It might be a good idea to run the wifi and bluetooth state update routines on core 0. Currently, the run in the end loop method on core 1, and take up some of core 1's processor time. If the routines run on core 0, they can run independent of core 1, and if core 1 is busy (eg: music player) the wifi and bluetooth states can still be updated. This might cause issues with wifi and bluetooth, because their tasks will have to share processor time with the state tasks.