Workbench local flash improvements

You should always use SYSTEM_THREAD(ENABLED). There is basically no advantage of not using it, and since almost all commercial products use it, including Tracker Edge and Monitor Edge, threading is far more tested than non-threaded. And threads are actually always enabled even if system threading is off.

The reason system threading is not the default it changes the behavior of how setup() and loop() work. With the default of threading disabled and AUTOMATIC mode, setup() and loop() are only called when cloud-connected. With threading or a different SYSTEM_MODE, they always run. Now it's usually far more useful to have them run and just check if cloud connected if you need to, but it would be a breaking change in behavior.

Using SYSTEM_MODE(AUTOMATIC) is fine.

You'll notice that Tracker Edge and Monitor Edge use SYSTEM_MODE(SEMI_AUTOMATIC) and call Particle.connect() in setup(). This is good if you have a situation where you want to boot but not connect to the cloud.

We do not recommend using SYSTEM_MODE(MANUAL) except if you are using the device without cellular, Wi-Fi, or cloud. The MANUAL mode often behaves in ways you would not expect.

4 Likes