Ah... I didn't connect the "Doug" aka dr_mumps with your full name.  (And
you can probably guess that I'm milbybw).

That's what I was saying, you need to write your own timeout.

local sTimeoutCounter

on openCard
  -- do your other stuff
  put 20 into sTimeoutCounter
  send "timeoutCheck" to me in 100 milliseconds
end openCard

on timeoutCheck
  -- using "-1" as the signal that we have found a device
  if sTimeoutCounter = -1 then
    exit timeoutCheck
  end if

  subtract 1 from sTimeoutCounter
  if sTimeoutCounter = 0 then
    answer "Did not find anything in time"
    -- call your timeout handler
  else
    send "timeoutCheck" to me in 100 milliseconds
  end if
end timeoutCheck

on mergBLEDidDiscoverPeripheral pPeripheral, pName, pRSSI
  -- in the code where you identify that you have found your particular
device, add this
  put -1 into sTimeoutCounter
end mergBLEDidDiscoverPeripheral
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to