Enhanced camera trigger logging - testing does not match wiki

I bench-tested the hot-shoe enhanced camera trigger logging today to ensure I had it right. My findings did not agree with the wiki - nor some other comments I’d heard off- line.

I use a Foxtech Map-02 (Sony A5100 internals) with it’s hot-shoe lead connected to Aux-5.

I have these parameters:

CAM_FEEDBACK_PIN=54 (Aux-5)
CAM_FEEDBACK_POL=1 (Trigger High)

I set LOG_DISARMED=1 so logging would happen on my workbench without arming my copter.

I powered up the copter and triggered the shutter 11 times with the hot shoe connected to Aux-5.

I then disconnected the hot-shoe lead, and triggered the shutter 10 more times.

The result in the log was 21 TRIG messages.

There were no CAM messages even though I’d triggered the shutter 10 times with the hot-shoe disconnected.

The wiki says that ArduPilot logs TRIG messages when it triggers the camera - and CAM messages when detecting shutter triggering via the hot-shoe.

This clearly does not happen. When I deactivated hot-shoe detection by setting CAM_FEEDBACK_PIN=-1 The result was CAM messages in the log - and no TRIG messages.

I checked logs from over a year ago when I wasn’t using hot-shoe operation - and those logs also show CAM messages only - so there doesn’t seem to be any recent firmware changes.

In addition to making sure my understanding of hot-shoe signaling and logging works, I have two additional questions:

QUESTION 1:
In my first test above, I disconnected the hot-shoe lead half way through the shutter operations. All of the operations however record a TRIG message. Is there any way to detect if the camera shutter was commanded but nothing was recorded from the hot-shoe? (hot shoe failure)

QUESTION 2:
I’ve seen comments over the past year of ArduPilot’s interpolation of GPS geo-position when the camera shutter operates between GPS location messages. This is particularly important for RTK operation using a hot-shoe. Can someone please verify that this interpolation is occurring?

I know this was a lot from one post - but I thought it made sense to keep it all together. Thank you for looking through this post - and any help you may be able to offer.

Back in older firmwares, it was imperative that BRD_PWM count was set low enough to not make the Aux pin used for feedback be tough to also be a PWM output, even if the Servo function for that pin was set appropriately. Check other possible assignments for that pin. Also see if you get cam messages by shorting the feedback pin to ground manually on the bench after a trigger has been sent. I use mission planner to look for round green photo marks to show up. Without those, feedback isn’t working on my planes.

Thank you Nathan - I think you’re on to something here.

I’m using D-Shot on this copter, with Aux 1-4 for Dshot, Aux 5 for the hot-shoe trigger, and Aux 6 for the shutter relay.

On the start up messages it shows that pwm-13 is still active - which I believe is Aux 5. So that would explain why the hot-shoe signal is not being seen.

I remember reading about BRD_PWM from earlier efforts - but as you can see, that parameter is not available in my list:

So the question is how to keep Aux 5 from being an active with PWM.

I’m guessing my problem is that I don’t have SERVO13_FUNCTION=-1 which sets it to GPIO.

I’m going to try that. I had noticed that I hadn’t gotten the “camera icon” you mentioned on my test flights. Hopefully this will fix this.

That changed with V4.2

@Naterater @dkemxr

Changing SERVO13_FUNCTION=-1 appears to be a step in the right direction.

After making that change and then triggering the shutter 10 times I get two camera icons displayed on the map:

And the startup messages no longer report PWM-13. (Aux-5)

And the log now has both CAM and TRIG messages - but only 4 CAM messages, and all 10 TRIG MESSAGES:

But it appears that I’m now getting a GPIO error - which is maybe why I’m only getting four CAM messages:

So now where to go from here? Maybe I shouldn’t set SERVO13_FUNCTION=-1 but to something else for that port to work as the hot-shoe input.

There doesn’t seem to be a SERVOx_FUNCTION value for hot-shoe trigger - which is an input. But there are some values for some camera output functions.


So it seems I’m missing a parameter setting somewhere that allows an AUX port to function as hot-shoe input.

I also tried changing CAM_FEEDBACK_POL from 1 to 0 to test for trigger-LOW instead of trigger-HIGH. That was no help.

Hmmm… Any suggestions?

I don’t have much knowledge of camera functions but that “ISR Flood on Pin 54” and the “Internal Errors on 200000” has been an indication of misconfiguration of camera parameters before and I believe the Pre-arm errors messages were added to highlight it. But if that applies here and what it may be I’m not sure. Do you have a relay configured?

Yes - it’s on Aux-6 and it works as it should.

Thank you for taking the time to look into this.

The pre-arm error was added to indicate when the same pin is assigned multiple functions but from what you have posted here that doesn’t seem to be the case.

Perhaps another post targeting these error messages relative to enhanced camera functions is warranted?

Agreed - I’ll do it tomorrow morning.

Thanks Dave!