Skip to content
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

Change NeoPixel Length for NTF LEDs #13332

Merged
merged 1 commit into from
Feb 4, 2020

Conversation

eovnu87435ds
Copy link
Contributor

This change allows more than a single NeoPixel in a chain be used for an NTF LED. In particular, I had some PCBs with 8 pixels on them, and I was able to dynamically change the number of status LEDs from 1 to 8 using parameter NTF_NEO_LEN.

Tested using Plane master on an omnibusf4pro.

Not sure if this has to do with my shoddy code but whenever I write a new value to NTF_NEO_LEN, mission planner disconnects from the aircraft.

I don't really know much C++ and this is my first ArduPilot edit, so looking for any criticism you might have.

@IamPete1
Copy link
Member

Do we need a param? Any disadvantage to just setting it to some larger number say 10? I guess we would output to LEDs that are not there, but I don't think that can be too much overhead.

@eovnu87435ds
Copy link
Contributor Author

@IamPete1 not sure. It would be cool to have the option of using arrays like this (I've been thinking about a similar concept for large multirotors). Going with an extremely large default string would probably do nothing but eat up memory for the majority of users, but I guess if there's a user-selected string length, then there probably has to be a safeguard to prevent out of memory issues?

tridge
tridge previously requested changes Jan 20, 2020
Copy link
Contributor

@tridge tridge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a good idea, thanks, just some minor issues I've noted

@rmackay9
Copy link
Contributor

This PR came up as solution to a support issue during Copter-4.0 testing so I vote for this going in. https://discuss.ardupilot.org/t/ws2812b-neopixel-integration/48580/30

@rmackay9
Copy link
Contributor

By the way, the commits should be squashed together to a single commit (no need for multiple commits to the same lines of code) and the commit description should start with "AP_Notify: ". Thanks!

@eovnu87435ds
Copy link
Contributor Author

Just made the fixes, I'll have to change the commit comment and I should be good

Copy link
Contributor Author

@eovnu87435ds eovnu87435ds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rmackay9 let me know if I should change how I have the commit commented.

@IamPete1
Copy link
Member

IamPete1 commented Feb 1, 2020

looks good to me, just need to squash the three commits together with the name of the last

@eovnu87435ds
Copy link
Contributor Author

looks good to me, just need to squash the three commits together with the name of the last

whoops, all taken care of now

@tridge tridge merged commit 455bd86 into ArduPilot:master Feb 4, 2020
@rmackay9
Copy link
Contributor

rmackay9 commented Jun 5, 2020

There was a request that we included this in Copter-4.0.4. I'm a bit reluctant to do that considering it's not a really critical fix .. still, I wanted to record the request somewhere.

@IamPete1
Copy link
Member

IamPete1 commented Jun 5, 2020

@rmackay9 I think this got into 4.0 with the ProfiLED stuff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants