Flic Home

    Community

    • Login
    • Search
    • Popular
    • Users

    Simple OSC Module Works...once

    Developers
    2
    6
    403
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ryan_joyner
      ryan_joyner last edited by

      I have successfully implemented the SDK to create an OSC module that send a trigger to QLab. However, it only works once. In other words, I press the button, it send the OSC string to QLab, everything works as it should. But then it's as if it stops listening for another button press. Am I missing something? Here is my JS in main.js:

      var oscClient = require("./osc").create("192.168.1.202", 53000);
      
      var buttonManager = require("buttons");
      
      buttonManager.on("buttonDown", function(obj) {
      	oscClient.send("/cue/2/start", function() {
      		console.log("message sent");
      	});
      });```
      Emil 1 Reply Last reply Reply Quote 0
      • ryan_joyner
        ryan_joyner @Emil last edited by

        @Emil It works now! Thanks so much for your help!

        1 Reply Last reply Reply Quote 0
        • Emil
          Emil FlicTeam last edited by

          @ryan_joyner Can you please try the new firmware 4.3.5?

          ryan_joyner 1 Reply Last reply Reply Quote 0
          • Emil
            Emil FlicTeam @ryan_joyner last edited by

            @ryan_joyner you can create a new udp socket. Just remember to close the old one to avoid resource leaking. The osc module currently exposes no way to close the socket so you would have to add that.

            1 Reply Last reply Reply Quote 0
            • ryan_joyner
              ryan_joyner @Emil last edited by

              @Emil Thanks for responding. Is there a quick and dirty fix I can use for now? Can I somehow restart the process to get it to "relisten" for the buttonDown event?

              Emil 1 Reply Last reply Reply Quote 0
              • Emil
                Emil FlicTeam @ryan_joyner last edited by

                @ryan_joyner Thank you for this bug report. We will investigate.

                ryan_joyner 1 Reply Last reply Reply Quote 0
                • First post
                  Last post