-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Personality example #29
Comments
Hi @midikidi , The sensible thing would be to add it to the base library, so everyone can benefit (and not have to reinvent the wheel). If RDMINIT was extended to take the RDMPERSONALITY, which is currently commented out, then adding a personalityDescription (32 chars) to each RDMPERSONALITY. Then there's a GET DMX_PERSONALITY_DESCRIPTION: And GET and SET DMX_PERSONALITY: So you'd just need to add them to _processRDMMessage like some of the existing PIDs. I'm biased, but you should test your code against the OLA RDM Responder Tests, the only (that I'm aware of) free and open source RDM test suite: You should definitely share your STM32F103 port, or possibly even do a PR to merge it as ifdef's if that's possible? There's also this for the Teensy, which is adapted from bits of this code and others: Ideally everyone would just write separate low level libraries and there would be one unified RDM library on top, so everyone would get all the best features, but that doesn't seem to have happened yet unfortunately. |
Hi Peter makes sense once sorted I will post the changes to DMXSerial2 and the port of STM32F103. The STM32 project is built with the STM32 Cube IDE not Arduino. I have added gets and sets to the parser but Im getting no where with the structures. added to ino file loop()
//-------------------------------------------------------------------------------------- struct RDMPERSONALITY { uint8_t personalityCount=5; //error here <cannot be initalised as const int Thankyou |
Please post it as a PR, it means people can make comments in-line on your code which makes reviewing and commenting SO much easier and it will all be properly formatted (which some of it currently isn't in the comment), plus it will run any continuous integration tests set up in the repo. Plus someone can pull it or try making changes knowing they are running the same code as you. The initial bit, you want to format it like this within RDMINIT:
Then:
Take these bits out:
|
Hi Pete, Im completely new to Github .I have added the zipped folder of the original code of DMXSerial2 with my changes added get personality description / get-set personality number. I changed RDMINIT struct and populated RDMPERSONALITY.there are compilation errors to do with the structure changed. |
That's okay, we all have to start somewhere? Have you used Git before? What OS are you using? They have some great guides here: I'd probably start with this: They've even got a desktop app: Or you can copy all your edits into the files on the website.
That's a good start, but it's still no where near as easy to comment on as a pull request unfortunately. I don't personally have the time to extract your zip files and diff the results, but I can spare some time to view a PR and comment on what might be going wrong.
Sharing the compilation errors is always a good start.
I'm not personally particularly interested in an STM32 version (I'm also not the author of this library, although I have contributed fairly heavily to it at times). I'm more interested in people generally producing good RDM implementations and avoiding too much reinventing the wheel usually helps that. I see the base DMXSerial2.cpp includes Arduino.h, which presumably you have to substitute with something else? Can those things be covered with ifdef macros ( https://www.deviceplus.com/arduino/arduino-preprocessor-directives-tutorial/ )? Then your STM32 code could just use the main library and so you wouldn't have to keep porting changes and improvements from one to the other. Hopefully @mathertel would be amenable to making the library a bit more cross-platform if it's a fairly easy fix? |
I've got personalities working and passing all the OLA RDM tests here #39 . This currently needs some changes to the data passed into the RDMINIT struct, but they're fairly self-explanatory. |
This is the best RDM example I have found many thanks.I have ported DMXSerial2 to an STM32F103 and its working well. I am using the original code as a testbed(MEGA2560) to add RDM functionality. I am trying to add some personalities but I am not sure at what point I should send the Personality description.I am using a Swisson to debug RDM. I can set number of personalities to 10 and set the current personality and the Swisson shows the correct values. Any help would be greatly appreciated.
The text was updated successfully, but these errors were encountered: