Apologies this may have come up before but I could not find it in the search.
Is it safe to register a listenner more than once ?
Is there a way to find out if I have already regsitered a listenner ?
How this arises. I have an app that can turn the GPS on / off. I also have a control that can switch on the logger without having to exit the App, switch it on and then reneter my App. If the Apps starts with the GPS off, I may power it on and then switch on the logger. If the Apps starts and I switch on the logger then this will effectively power on the GPS and I want to register a listener at that point as well.
BTW could not find documentation for Bangle.on() in the API reference ? Am I missing something.
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.
Apologies this may have come up before but I could not find it in the search.
Is it safe to register a listenner more than once ?
Is there a way to find out if I have already regsitered a listenner ?
How this arises. I have an app that can turn the GPS on / off. I also have a control that can switch on the logger without having to exit the App, switch it on and then reneter my App. If the Apps starts with the GPS off, I may power it on and then switch on the logger. If the Apps starts and I switch on the logger then this will effectively power on the GPS and I want to register a listener at that point as well.
BTW could not find documentation for Bangle.on() in the API reference ? Am I missing something.