well order parts to give this a go,also ordered back to front jacket and padded cell for when my 1/2 brain cell explodes think this will keep me occupied during these tough times thank you Randy im a happy OAP
Hey @rmackay9
Had no luck with LED neopixel scripting on stable version. The latest master started accepting scripts on my Cube purple somehow. And it works. Thanks to @iampete for sample scripts.
Disclaimer: Donāt follow the servo rail power connection as shown in the video.
OK, itās very possible that the scripting support for LED control isnāt in the stable releases yet.
Great that you got it working and it should work with Copter-4.1.x if not earlier.
Hey @iampete @rmackay9
Is there bindings for pre-arm check?
I was thinking to make led fast blink red when it hasnāt passed pre-arm checks and fast blink green when all pre-arm checks are passed.
Any suggestions?
Thank you.
we do have a binding to perform a lua pre-arm check, you could check the loaded mission contains a take off and landing or what ever else and refuse to arm from from scripting.
I think what you want is to ask ArduPilot if it would pass checks and arm if you were to try now? We canāt do this currently, what would be nice is to read the notify state, so you can have custom LED notify patterns via scripting.
Yes. It would be nice to read the notify state and output scripted LED pattern. I actually use a mavlink LED controller which does this when connected to telemetry. But itās too much hardware inbetween for something which can be done through simple scripting.
I just want LEDs to display whether checks are passed. If yes, then blinking green. Else, blinking red.
Thank you.
Hey @iampete
Can this binding be used?
āsingleton AP_AHRS method prearm_healthy booleanā
That tells you if the AHRS is ready to arm, but you could still fail arming for other reasons, fail safes for example or low voltage. That might be good enough for your use case tho.
Hey @iampete
I tried writing script for playing tune on high roll or pitch angle. Iām not able to figure out threshold value. I read roll has to be in radians. I tried both in radians and degrees. It doesnāt work.
Am I missing something?
Thank you.
yes, roll and pitch will be in radians. So 90deg is 1.57. Pitch will never be >90degrees though. once it becomes >90 youāll see that instead roll suddenly becomes around 180 and pitch becomes -90.
Yes. I was doing bench test by giving various values. Iām planning to set it for 30 degree on roll and pitch, so around 0.52 rad?
How does it vary? Will it be +0.52rad for left and -0.52rad to right?
Thank you.
Iām in the advanced user model,but I cannot find SCR_ENABLE parameter.I donāt know why.Now Iām trying rebrush firmware
@zthcool, I can imagine two possible reasons - first make sure that Copter-4.0.3 (or higher) is on the autopilot. Then I wonder if perhaps it is a Pixhawk autopilot which suffers from the 1Mb flash limit (a hardware issue with the STM CPU). Some older Pixhawks have this issue. If it is a Pixhawk then you could try directly downloading and then uploading the arducopter.apj file from the Pixhawk1 direction on firmware.ardupilot.org to see if that works.
WOW!! Amazing !!! YES Iām using Pixhawk1,I upload the Rover 4.0 directly,and SCR_ENABLE appeared.Thank you very much.
And when I upload firmware just now with MP 1.3.71 in auto model,It cannot find comports when has been downloaded.But 1.3.70 works well.
Now the Lua Scripts is working.At first I only use USB to connect MP,It said āNo scripts to runā.Then I connected battery.It worked!
Excellent, great stuff.
Ah, by the way, the features shown in this video are not available in Copter-4.0.3 (or 4.0.4). Youāll need to load ālatestā (aka āmasterā) which can be loaded onto the autopilot from MPās Install Firmware screen after pressing āCtrl-Qā. Alternatively the ālatestā firmware for a Pixhawk1 can be downloaded from here. Please be careful with ālatestā though because it hasnāt gone through beta testing so itās not as safe as beta or stable.
Iāll try it with Roverās latest firmware.Thanks for reminding me.
When I connected mulit-vehicles.Could I use Lua Scripts to get other vehicles data,such as GPS singal?
@zthcool, not yet Iām afraid. I think it might be possible after this PR goes in: https://github.com/ArduPilot/ardupilot/pull/13660
Iāll continue to focus on the PR.Thanks for guiding me
Now I find MP support Python Scripts.I looked through Script.cs and CurrentState.cs files,didnāt find info about multi-vehicles operation options.Is there any possible to realize get other vehicles data?And how does MP get these multi-vehicles parameters meanwhile?