Profi LED LUA script not working since 4.2

The example scripts for Hexsoon 450 Profi LED as well as others no longer work correctly. I can only get them to run once, and they all turn red. Can anyone help?

Which flight controller? BDshot build or normal?

Normal - Cube Orange+ It will change them one time from the standard white to all red. Then even after a power down and up it will not work. I have to delete and re-upload the script to make it do it again and get the same result of all red. Using the script right our of the GIT repository.

I vaguely remember having a similar issue on my Hexsoon 650, can’t remember what I did to solve.

I just tested this on a Hexsoon 450. LED script working on 4.2. Flashed up to 4.4.2 (the only change I made) and confirm that the LEDS are not working. Something has been broken…

Experiencing similar here. I’ve been suffering with it for a while, but it’s probably time to fix it.

I just tried a bunch of permutations of parameters and a few minor tweaks to the script, but nothing had a positive effect. I can’t even get ProfiLED NTF LEDs to work at this point.

Using 4.4.2 on a Cube Orange with ProfiLEDs on AUX 5 and 6.

I see that this commit:
AP_Notify: add defines for some AP_Notify LED libraries · ArduPilot/ardupilot@d9aa0c9 (github.com)
Adds some ifdef guards to disable the feature. I wonder if that’s misbehaving or accidentally compiled out of Cube Orange? extract_features.py run against CubeOrange-bdshot 4.4.2 shows the feature enabled. Haven’t dug further.

Do I need to add this discussion somewhere else to get it added to the proper bug list?

I’m having a look, I can confirm it doesn’t work …

Please can you try this? ProfiLED Fix by andyp1per · Pull Request #25518 · ArduPilot/ardupilot · GitHub

@andyp1per, have not flown, but successfully built, uploaded, and tested that my EDU450 LEDs appear to be working again with your PR on both CubeOrange and CubeOrange-bdshot board configs.

I tested on the legacy H743 Cube Orange, but I do have a CubeOrange+ on the bench that I can test as well, if needed.

Binaries:
CubeOrange
CubeOrange-bdshot

Kindly request a backport to stable once the fix is confirmed good.

1 Like

Andy,

I am not sure how I get the change. How do I use the “pull request”?, or is it now part of the 4.4?

Bryan Gembusia

You need to build the firmware using Andy’s branch or PR. It has not been merged yet, and it will be part of 4.5-dev until backported. If you like, I can build a CubeOrange+ binary for you, but it will be built as 4.5-dev, so not regarded as stable.

Yuri,

That would work – I will then test with the lights on the CubeOrange+ and get back to you.

BG

Here you go:

CubeOrangePlus
CubeOrangePlus-bdshot

The PR has been approved based on the testing I did, but it is not merged yet, and typically backports take some time to be approved and incorporated, in part because of the release schedule.

1 Like

Andy’s fix is merged, so it should be available in the next 4.5-dev nightly build (within ~24 hours).

The fix allows me to set the colors of the LED’s. The example script however will not do the “strobe when armed” section of the code. I am pulling the sample script from Github, and in 4.2 the strobe function works. This is on the cube Orange+. If you want to try another build, I am happy to keep testing.

Sounds like a different problem

Andy, It may be, but the same code works in 4.2. There is video of it working in 4.2 on youtube. The exact same code works differently in the new version. The lights work as NAV lights now. This was my primary concern, but the “strobe” feature is not working.

I will test that exact script and report back. I tested a customized script that I wrote, and it seemed to work fine. I may have time later today to try it out and possibly swap a CubeOrange+ in to compare results (which should make no difference as far as I can tell).

This is the one I am running - libraries/AP_Scripting/applets/Hexsoon LEDs.lua