Giter Site home page Giter Site logo

Comments (6)

cansik avatar cansik commented on July 25, 2024 1

Afaik there is no mechanism built into artnet4j that would prevent this behaviour (only send every nth second). Maybe android is messing with the sockets. I think I can not really help you with that problem, but I'll let the issue open for others with artnet4j & android experience.

from artnet4j.

cansik avatar cansik commented on July 25, 2024

Hi, thanks for the provided video, would it also be possible to provide a minimal example which shows the problem? Without code it is difficult to help you with that.

from artnet4j.

Nspada2 avatar Nspada2 commented on July 25, 2024
ArtNetClient artnet=new ArtNetClient();
        artnet.start();
        artnet.getArtNetServer().addListener(
                new ArtNetServerEventAdapter() {
                    @Override public void artNetPacketReceived(ArtNetPacket packet) {
                        dmxData = artnet.readDmxData(0, 0);
                        System.out.println("1:" + Byte.toUnsignedInt(dmxData[0]) + " 2:" + Byte.toUnsignedInt(dmxData[1]));
                        int a,b;
                        a=Byte.toUnsignedInt(dmxData[0])*20/255;
                        b=Byte.toUnsignedInt(dmxData[1])*20/255;
                        binding.textview1.setText("1:" + a + " 2:" + b);
                        binding.progressBar.setProgress(a);
                        binding.progressBar2.setProgress(b);
                    }
                });

from artnet4j.

cansik avatar cansik commented on July 25, 2024

Does this behaviour happen only on android or is it possible to reproduce it on a computer as well?

To be honest, I can't find anything special in the code and I don't own an android phone. So it's a bit difficult to test.

from artnet4j.

Nspada2 avatar Nspada2 commented on July 25, 2024

It's impossible to try that on android studio because of the network adaptor isolated from the host.
It never hapens with other software.
What I think is that it stops reading as soon as artnet stop transmitting, but, artnet protocol can stay "mute" up to 3 seconds if notthing changes, it only talk when something change or, if not, it sends a confirm that is alive every 3 secs.
A workaround I found is to use a channel which I don't use and give it a sinewave, so values are always changing and the connecrion is always mantained.

from artnet4j.

Nspada2 avatar Nspada2 commented on July 25, 2024

No problem, in my app I only use the reciver, but this could be helpful for someone with my preblem.
BTW the workaround works fine (if you can control the artnetOut)

from artnet4j.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.