Support for the Runcam protocol

I have seen the issue"Implement support for the Runcam protocol #12810" but have not been able to find the parameter settings for using this in 4.0.3. I have a Runcam Micro Swift so it would be ideal to use this functionality.
Does anyone know if it is implemented yet and if so in what version?

It’s only in master, so ArduPilot 4.1.x - which is not yet released. You will have to build from source.

Thank you for reponding.
I doubt I am ready for a “rebuild from source”. Any idea about when 4.1.x might be released?

I did build from source (Pixracer --board fmuv4) according to the docs and got a working firmware which in Mission Planner turns up as 4.0.4-dev (ceb0a9c8). I have checked for the specific parameters mentioned in #12810 (like CAM_RC_CONTROL, RX8_OPTION = 78 etc) but these are not there so obviously I am doing something wrong. I have looked for branch like 4.1.x but could not find any so I assume that using master is correct. Can you point me in the right direction?

Here are the docs

Thankyou for the info, will help a lot once I get the correct version running.
Sorry for my ignorance but because of you mentioning “You will have to build from source” I must ask again.
As mentioned, when compiling from master the version I get is 4.0.4 so I suppose I have to do something else to get 4.1 which include the Runcam protocol in the firmware.

No, that’s the right version

Thank you. My question comes from that there is no listing for the parameters alternative 79 for RCX_OPTION or SERIALX_PROTOCOL = 26. Might be that the text just is forgotten in the implementation so I will try it according to the docs.

If you are using mission planner you will need to use a beta version to see the text

Many thanks, yes it is Mission Planner. Will hopefully get some time to try it tomorrow

I have now spent quite a few hours exploring the RunCam functionality. My setup is a spare Pixracer R14 (Chinese clone), FRSky R-XSR receiver and a RunCam Micro Swift3 V2. The ArduCopter version is 4.04 dev as mentioned above. The camera is connected to the Serial2 port (option 26) and a switch is hooked up to RC10 (option 79) on a Taranis Q7S.

Most notable problem is that nearly all times the “roll right” function does not start the remote mode session. On the other hand, the switch function always works and oddly if first setting the switch on/off then the “roll right” always leads to remote mode as it should.

When in remote mode a longer “pitch up” leads to the OSD menu and then “pitch up/down” will move the cursor up/down. Placing the cursor on an item with alternatives and then choose desired alternative with “yaw right” also works. A “yaw right” at the exit option terminates this menu.

Entering remote mode and thereafter using “yaw right” leads to the camera menu but it can be a trial and error to find this menu. Oddly, after entering the remote mode an on/off sequence on the switch might lead to the camera menu as well.

When in remote mode a press on “roll right” can switch preset scenes and and “pitch down” will reset the OSD.

When trying different options the camera sometimes sends an error message “-> Exit first” but if there is no menu showing up then entering an exit option is a hopeless task. A camera reboot is the only remedy I have found. If this error message shows up when in a visible menu positioning the cursor to the exit option and do a “yaw right” will do the job.

Setting the switch to off or a “yaw left” will terminate remote mode.

The camera is sometimes reacting slow so commands might appear as not working well.

Being able to change the RunCam settings from ArduPilot is a most welcome feature and even if it took a bit of trial and error to understand how it worked I could accomplish everything what I wanted to do. Many thanks for your effort to incorporate this function.

Thanks for the report!

Can you possibly switch on the debug flag in the code and send me the output with the precise actions you tried together with your parameter file? The state machine is quite complicated and getting it to work correctly on all cameras together with RunCam’s fire and forget protocol was quite tricky!

Roll right doesn’t work the same on the 5-key OSD type cameras as it does on the splits because of this remote mode. IIRC you have to use yaw right, throttle center to enter on those cameras?

As I am new to Arducopter I have to ask what logging you are referring to, is it the dataflash log enabled from startup or something I have to set during compile time?

You will need to use mavproxy to see the output

Enclosed are a few log files. One complete log and a number of extracts from an actual problem. Hope it will be OK.CompleteLog.txt (59.1 KB) ExitFirstError2.txt (2.8 KB) ExitFirstProblem.txt (23.6 KB) mav.parm (28.3 KB) Params_200510.param (18.1 KB) RemoteModeNotStarting.txt (4.6 KB) RemoteModeNotStarting2.txt (5.3 KB) RemoteModeNotStartingNoCamMenuExitFirstErr.txt (6.4 KB)

The logs look good. Can you please describe what stick commands you used and what you saw for each of the problems? Thx

For instance in RemoteModeNoteStarting your log starts like this:

RunCam[IN_MENU]: update_state_machine_disarmed(IN_MENU_RIGHT)
RunCam[IN_MENU]: OSD cable simulation event IN_MENU_RIGHT

but the camera never starts in the “IN_MENU” state, so it seems something is missing. For each problem can you make sure you start from fully powered off of everything. The issue is that once the state machine is confused then subsequent actions will be wrong - it’s catching where it gets confused that is the trick.

RemoteModeNotStarting is always: The “roll right” move made once or more times does not result in that the remote mode starts. Then I set the switch to on followed by off (which immediately shows that remote mode has started/stopped). After this on/off switch procedure the “roll right” stick move always starts the remote mode.

Please keep in mind that this is what is shown on the screen, the actual behavior might be something else.

For the Exit First problem I can not tell exactly what led to this but when this error is shown on the screen I have found no way to make the exit.

For the …NoCamMenu… log I started as mentioned in first item. Once the text Remote Mode popped up I made one or more “yaw right” to come to the camera menu without success and then after some more actions came the “->Exit First” message again which is impossible to recover from.

Maybe I should add that entering into remote mode results in that nothing more than the text “Remote Mode” is shown, the Camera and the OSD menus have to be made visible by commands.

The last part of the complete log shows a session which ran smoothly without any errors.

I get the feeling that much of this is dependent on the camera firmware itself and that I as a user have to accept learning the ways how to overcome it. For example, to begin with I tried to start by only using the “roll right” move which did not work at all. It was not until I did set up also the switch I could enter into the remote mode.

Hope this makes any sense but if not please revert. From my side I now can accomplish what I want but I am glad if I can contribute with any useful info.

Something is odd with my browser or the forum. Even if I select reply and while edited the message shows up as directed to you once I click reply it turns out to be just an additional item without any reference. So did my message of late yesterday and a couple of others which I did remove and rewrite.
In any case, above is an answer to your questions.

@andyp1per So I finally fired up Plane 4.1 beta and configured the Split 2S to start and stop recording. This works well. Thanks for you efforts with this. The Split 2S has a photo mode I think. Is this changeable by UART? Also the Runcam OSD is quite hit-and-miss for me. I have a few times managed to get the OSDs out of sync so I have both on at the same time. The up and down right stick movements only result in down OSD navigation for me.

TBH – I am pretty happy with reliable start/stop recording. Be nice if photo mode can be selected as well. Did I miss something?

I did not do photo mode - it was already pretty tricky to get video/menus working on that camera. Did you set the correct camera type in the config?