inav icon indicating copy to clipboard operation
inav copied to clipboard

Runcam Split control Flaky

Open Redshifft opened this issue 8 years ago • 77 comments

Very intermittent UART control on 1.8.1 with Runcam Split V1 on latest fw v2.0 (or any other fw) When it works the control acts like a toggle, I'm am unsure if this is even the correct. Regardless at next boot it often does not even work at all.

Redshifft avatar Feb 11 '18 18:02 Redshifft

I can confirm this issue also. Tried Split FW 1.1 and 2.0 with same results. Flashed iNav back to 1.7.3 and no issues.

RealmsAU avatar Feb 12 '18 11:02 RealmsAU

Also...I have camera power activated when I arm. When disarming the camera it is still recording, it doesn't stop the recording. Is that normal?

RealmsAU avatar Feb 12 '18 11:02 RealmsAU

Good you posted, tbh although I get it working occasionally I have not seen the thing working as it is intended with regard to how it works, seems to toggle the functions? Starting with the descriptions of the actions it is very poor from i'm assuming runcam (power,which should be called start/stop) etc

Redshifft avatar Feb 12 '18 12:02 Redshifft

I did not mention, when it was working I did not use the "Auto start" I could not see the point as it could be started and stopped remotely. I think the issue has to be an initialisation problem in latest INAV because if you get it working all is well until the battery is disconnected

Redshifft avatar Feb 12 '18 12:02 Redshifft

I got it to work once and that was it on 1.8... I had auto start on power up disabled also however when toggling the camera power mode it just wouldn't start. Tried this on both Runcam FW 1.1 and 2.0 with the same outcome. With iNav 1.7.3 it worked everytime except it doesn't stop the recording when i toggle out of the mode.

RealmsAU avatar Feb 12 '18 12:02 RealmsAU

Lol, sounds like when mine worked it worked the same. Basically runcams control logic is so basic it's essentially a toggle and each time it sees whatever (protocol via the UART) it gives it the same as a button press action - which would be why it requires 3 control switches and each action just toggles the state You will love the workaround I have done to enable 1 switch to start and stop the video ;) We just need the Devs to find the problem with it not initialising and if you have a Taranis I will show you how to do it. In1.7.3 did the "mode" light up in the configurator when you actioned the camera control?

Redshifft avatar Feb 12 '18 13:02 Redshifft

Yeah it's pretty basic.... I can knock up a logical switch to fix that. Just checked and no.... the mode doesn't light up when starting the camera in 1.7.3 at least it works though!

RealmsAU avatar Feb 12 '18 13:02 RealmsAU

Interesting, no light should mean it is not actioned apparently - mine did not also Yeah for the function to toggle it needed so see that UART for about 250ms, problem was you could toggle states by setting INAV to switch at say 1000us and 2000us but if the switch was switched fast it sometimes did not action then next time you switched to "on" it would turn off the record :) Ingenious 0.5sec "servo slow" on that switch channel with the activation range set across the middle range say 1.2~1.8ms allowed the perfect repeatable time to toggle the function every time :) worked a bloody treat, only then to discover this problem :(

Redshifft avatar Feb 12 '18 13:02 Redshifft

Ah yes, I noticed that too. Just tried your fix and works a treat. You could create a logical switch that is triggered by a physical 3 way. You could have both top and bottom of the switch the same value to start/stop and the middle is out of the activate band.

RealmsAU avatar Feb 12 '18 14:02 RealmsAU

The problem is that until firmware 2.0, there was no way to ask the camera to start/stop recording or take a picture, the only thing the API could do is simulate button presses. That's the reason why currently the controls are so clunky.

I plan to drop support for RC Split firmwares < 2.0 and make the camera handling more robust, but time has been tight lately.

fiam avatar Feb 12 '18 14:02 fiam

`

Baud Rate Data Bits Stop Bits Patiry
115200 8 1 none

`

Redshifft avatar Feb 12 '18 14:02 Redshifft

@RealmsFPV :D no one will touch me with a mechanical solution, I just don't do code

@fiam all the fw versions acted the same - suppose it would with the same operating code which it seems Runcam wrote and added to INAV - strange Betaflight has had the same problems just recently

Redshifft avatar Feb 12 '18 14:02 Redshifft

Didn't have a long run of success.. https://github.com/iNavFlight/inav/commit/fa603a27ef09680688a7129bd7a742ad1ff7c85e

Redshifft avatar Feb 12 '18 14:02 Redshifft

It did not paste that serial code here is a link.. https://support.runcam.com/hc/en-us/articles/115011786628?input_string=runcam+split+inav+control

Redshifft avatar Feb 12 '18 16:02 Redshifft

Hey guys, I'm sorry about that, the 1.8.0 can't work with your split, might be it was caused by the PR that used to support new RC SPLIT firmware(including exactly control, like start/stop, take photo...), and it was submit by me:(, @fiam was help me to improve the camera date update and useful suggestions, thanks!

and I'm preparing a PR for this issue, I think this problem was caused by the initializing for the device failed when the duration of rcsplit initializing is longer then FC, so the FC can't communicate with RC SPLIT correctly. this is the first look of the PR, but still need to confirm it has solved this issue:( https://github.com/azolyoung/cleanflight/commit/23e7b0b0e25041318cfdce4182362f99ef61689f

@RealmsFPV , If I gues right, you've test the SPRACINGF3(1.8.1), but still not work:(, is that right? I still suspect the camera out of control is caused by failure of initialization. and If your throttle is unlocked, in the 1.8.1(the SPRACINGF3 firmware we sent to you) it may also cause RC SPLIT to fail to initialize, Is it possible?

@Redshifft could I sent a test firmware to you to confirm 23e7b0b is solved the issues in you case? If ok, please tell me the name of your FC BOARD, I'll post the firmware af here.

azolyoung avatar Feb 13 '18 02:02 azolyoung

@azolyoung Yes, that was me from the Runcam support channel. I tested 1.8.1 on SPRACING F3 but could not get it to work. Are you saying it wont activate if the motor/s are armed?

RealmsAU avatar Feb 13 '18 03:02 RealmsAU

Hi @RealmsFPV , Yes, for now, there are two places will initialze the RC split:

  1. when FC initializing, it'll try to initialize RC split, but it might failed in some cases, e.g RC split still in initializing when FC talk with it
  2. when the modes and serial port are setup, and you try to active the MODE, FC will check the RC SPLIT status, if it is not prepared, FC will try to reinitialize RC split, but it will do nothing when motors are armed

so I guess you can't work with the test firmware, it might be the motors are aming

azolyoung avatar Feb 13 '18 03:02 azolyoung

@azolyoung I see. It's a pity because I only want to start recording and stop when arming and disarming. To have the function on the same mode switch just seams logical to me. Can this be done?

RealmsAU avatar Feb 13 '18 04:02 RealmsAU

@RealmsFPV Oh, I see.. so your arming channel is same with channel of start/stop record?

azolyoung avatar Feb 13 '18 04:02 azolyoung

@azolyoung Yes, correct. Makes sense to me. I arm and take off land and disarm. Exactly when I want to record!

RealmsAU avatar Feb 13 '18 04:02 RealmsAU