Sensor questions

Graham Samuel livfoss at mac.com
Fri Nov 13 08:26:50 EST 2020


A couple of more general questions about mobile sensor functions in LC.

1. The dictionary seems to offer messages only from those sensors which are associated with native sensors in the device such as an accelerometer. Suppose I have an external sensor, for example a heart monitor connected via Bluetooth - how do I access that?

2. If a script processes sensor input by responding to messages from the sensor as they come in (as for example it does with locationChanged messages associated with GPS), what happens when the processing time for the sensor message exceeds the time between sensor inputs? Is it necessary for the script to detect that an instance of the message is already running, or does LC itself inhibit this recursion-like behaviour? Up to now I have kind of dealt with this by limiting the processing of locationChanged messages via a timer, but this is not a general solution. Can anyone explain what happens - I think the answer lies in the message queue, which I don’t fully understand.

Graham



More information about the use-livecode mailing list