Git Product home page Git Product logo

Comments (6)

mattjlewis avatar mattjlewis commented on May 25, 2024

Hi, what aspect of diozero are you referring to here?

from diozero.

yohayg avatar yohayg commented on May 25, 2024

diozero-ws281x-java. I'm trying to use WS281xTest.java to set the channel same as in https://github.com/jgarff/rpi_ws281x/blob/master/python/examples/strandtest.py

from diozero.

mattjlewis avatar mattjlewis commented on May 25, 2024

I've just committed code that hopefully fixes this. Could you test and close the issue if it works please (I need to dig out my neopixels...). I'm in the processing of pushing the new snapshot build to maven central too.
Thanks, Matt

from diozero.

yohayg avatar yohayg commented on May 25, 2024

Great, thanks I'll check. (I have just finished building my own jni for setting the channel). I'll test it first thing tomorrow!

from diozero.

yohayg avatar yohayg commented on May 25, 2024

OK it works. The only thing I had to fix is in com_diozero_ws281xj_WS281x.c from

jobject direct_buffer = (*env)->NewDirectByteBuffer(env, led_string.channel[0].leds, numLeds*sizeof(ws2811_led_t));

to
jobject direct_buffer = (*env)->NewDirectByteBuffer(env, led_string.channel[channel].leds, numLeds*sizeof(ws2811_led_t));

from diozero.

mattjlewis avatar mattjlewis commented on May 25, 2024

Great, thanks for testing. I've committed that change, I'll push a new snapshot build tonight and close this issue when done.

from diozero.

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.