Script for FPV drone #1215
AlexSin4
started this conversation in
Show and tell
Replies: 1 comment 5 replies
-
*DRRC=">r1!3N+^DRRC. This is a recursive coding, it is generally a bad practice as you eventually run out of stack. I think you want, while recording, sleep 3 seconds before testing again, otherwise return. *DRRC=">r0!3N+!R". This does that without any stack issues. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm FPV drone pilot. I have 5-inch freestyle drone. Generally, I shoot cable wakeboard athletes. For video shooting I use GoPro 11 mounted on the drone. I don’t use auto GoPro settings and set everything (ISO, shutter speed, ND filter) manually because I believe that after certain amount of practice I’ll be able to I deliver better output than “auto GoPro”. The order of my actions is as follows:
When the battery runs dry or a chosen rider falls down, I return drone, land it, press “rec” button on GoPro to stop recording and start from the Step#1.
Tasks
I have the following tasks for GoPro:
Task 1. Indicate ambient light level so that I can set appropriate ND filter and ISO
Task 2. Start filming only when the drone gets off the ground
Task 3. Maximize battery life
The solution to these tasks:
Task 1.
HIST=1 – shows me the histogram.
EXPS=1 – shows me current ISO and shutter speed. Generally, I shoot with “ISO MAX” equal 100. I temporary set “ISO MAX” to something like 800 and turn camera towards the Sun. If I chose correct ND filter the camera will show ISO in the range of 110-190. After that I set “ISO MAX” back equal 100.
Task 2.
I know there is option to get gyroscope and accelerometer values to start filming but I didn’t find way to combine it with Task 3 solution.
Task 3.
I need to turn off as much GoPro features as possible before filming and turn them on after filming is over. In this way before I start shooting I need to disable histogram (HIST=0), disable display the current ISO and shutter speed (EXPS=0), disable audio recording (DAUD=1), set the display to the lowest possible brightness (oB1), turn off the display immediately (oD0) and I want the disabled features to be recovered automatically after the filming has just finished.
Script
I created three “setup” scripts and one “launch” script.
"Setup" scripts are entered only once as they are permanent (be sure to follow the order: start from the first). The QR code of the “launch” script is shown to GoPro every time after the drone battery is plugged and drone is on the ground but obviously before it is armed.
Setup scripts:
aAaSoV7oB9oD4oC30oS1v0oR1oF0*DRPR=""*DRIN="*DROT=""*DRRC=""
*DRPR="!B=W0>g45=Z+1+=W1>a0.125=Z+8+=W1<W1=Z0>y1=Z0+!1N+mV2+!X=YZ=Y&36>Y1!S+oDO+^DRRC+!X^DRPR"
*DRIN="*EXPS=0*HIST=0*DAUD=1oB1DO=Z0"*DROT="*EXPS=1*HIST=1*DAUD=0oB9"*DRRC=">r1!3N+^DRRC"
Launch script:
^DRIN^DRPR^DROT
Comments to the scripts
Setup script 1
aAaSoV7oB9oD4oC30oS1v0oR1oF0
– this is completely optional. I set back light to 100%, turn off voice control, set all leds on, turn off front LCD, set back LCD off after 1 min, beep volume to 70% etc.*DRPR=""*DRIN="*DROT=""*DRRC=""
– I use 4 marcos (*fourcc) and reset each to zero as I noticed that GoPro sometimes freezes when I try to renew macro without previously resetting it to zero, especially often it happens when macro includes oBx commands.Setup script 2
>g45
and>a0.125
threshold for gyroscope and accelerometer, suitable for my drone.>y1=Z0+!1N+mV2+!X
– if I need to abort macro after the “launch” script I just press the “mode” button. I shoot in Cinematic preset (mV2) so I want camera to set it again.=Y&36
– the script waits for 4(four) consecutive triggers of IMU as I noticed that drone arming sometimes triggers IMU and I get 0-30 seconds of too early footage even if I set high threshold.>Y1!S+oDO+^DRRC+!X
– If 4(four) consecutive triggers of IMU happen the record starts, the display is turned off. The script does not stop recording automatically, you have to press "rec" button on GoPro - somehow i found it more reliable, convenient and battery saving.Setup script 3
*DRIN="*EXPS=0*HIST=0*DAUD=1oB1DO"
– get ready for the shooting and turn off histogram, audio recording and display.*DROT="*EXPS=1*HIST=1*DAUD=0oB9"
– the recording is over and I need to recover all the disabled features.*DRRC=">r1!3N+^DRRC"
– checking every 3 seconds that the recording has ended to recover the disable features.Sorry for the long read. Hope this is useful for someone )
Beta Was this translation helpful? Give feedback.
All reactions