setWatch - feature request

Posted on
  • Hi Gordon,

    When the callback function of setWatch is called, an object is passed with the following variables:

    "time", "lastTime", "state"

    Please include "pin". I would like to use the same callback function multiple times for several pins. So we need to know the pin as well.

    Many thanks

    Sacha

  • Workaround with inline function:

    setWatch(function(e) { myfunction(B12,e); },B12,{repeat: true, debounce: 20});

    Sacha

  • Thanks - yes, that'd be a good addition. I'll add it to the todo list :)

  • Perfect. Thanks

    Sacha

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

setWatch - feature request

Posted by Avatar for Sacha @Sacha

Actions