I'm not entirely sure about the reasoning for that anyway?
It's just to make an update of full BLE advertizing, while there are many calls of updateAdv in many functions. So I can call updateAdv in every place where I change some part of advertizing data but actually I have only one update where all these fields are changed. It is update aggregator.
I use similar code in many places. For example, in my big clock there may be few additional info, and it is resonable to update screen one time, after all data is redrawed to screenbuffer.
Ok, I'll try to turn it off and check.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
It's just to make an update of full BLE advertizing, while there are many calls of updateAdv in many functions. So I can call updateAdv in every place where I change some part of advertizing data but actually I have only one update where all these fields are changed. It is update aggregator.
I use similar code in many places. For example, in my big clock there may be few additional info, and it is resonable to update screen one time, after all data is redrawed to screenbuffer.
Ok, I'll try to turn it off and check.