Giter Club home page Giter Club logo

Comments (6)

JoshDreamland avatar JoshDreamland commented on July 28, 2024

The pull request I opened allows for optional arguments, but it uses a different protocol for the rainbow instruction. You could backport it to use the old rainbow instruction, but keep the optional speed argument.

from rogauracore.

saintlyzero avatar saintlyzero commented on July 28, 2024

Hey Josh,
Thanks for the quick response.

I tried backporting and running it, but when I execute $ make, it threw some errors.

src/rogauracore.c:278:52: error: initializer element is not constant
{"single_breathing", &single_breathing, 2, 1, {SPEED}},

src/rogauracore.c:278:52: note: (near initialization for ‘FUNCTION_RECORDS[1].scalars[0]’)
src/rogauracore.c:279:54: error: initializer element is not constant
{"single_colorcycle", &single_colorcycle, 0, 1, {SPEED}},

src/rogauracore.c:279:54: note: (near initialization for ‘FUNCTION_RECORDS[2].scalars[0]’)
src/rogauracore.c:281:50: error: initializer element is not constant
{"multi_breathing", &multi_breathing, 4, 1, {SPEED}},

src/rogauracore.c:281:50: note: (near initialization for ‘FUNCTION_RECORDS[4].scalars[0]’)
src/rogauracore.c:291:44: error: initializer element is not constant
{"brightness", &set_brightness, 0, 1, {BRIGHTNESS}},

src/rogauracore.c:291:44: note: (near initialization for ‘FUNCTION_RECORDS[14].scalars[0]’)

Makefile:395: recipe for target 'src/rogauracore.o' failed
make[1]: *** [src/rogauracore.o] Error 1

From this thread, I figured out that declaring const over here is generating errors.

const ScalarDef SPEED = { "SPEED", "speed", 1, 3 };
const ScalarDef BRIGHTNESS = { "BRIGHTNESS", "brightness", 0, 3 };

How do I fix this?

from rogauracore.

JoshDreamland avatar JoshDreamland commented on July 28, 2024

Oh, I thought I patched that. I might still have local changes; I'll have to check later. The fix looks like what I did in #32.

from rogauracore.

saintlyzero avatar saintlyzero commented on July 28, 2024

Yes, replacing const with #define fixed it.
I've made a pull request, do check it. Now it compiles without any errors.
But still, I am not able to figure out how to add the speed parameter alongside rainbow.
I executed

$ sudo rogauracore rainbow 2

and I'm getting Function rainbow takes no arguments.
Is this the right command?

from rogauracore.

JoshDreamland avatar JoshDreamland commented on July 28, 2024

My master branch is behind wroberts', so the fix still applied to it, but the branch you wanted to edit was retool. But if the rainbow command Will is using works for you, the one I'm using likely will not. You'd need to plug the old rainbow code into it, as well, right around line 298.

From the looks of things, that branch should already build, as-is.

from rogauracore.

saintlyzero avatar saintlyzero commented on July 28, 2024

Okay. I'll try the old rainbow code.

Thanks!

from rogauracore.

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.