Open Morgan-Caldbeck opened 10 months ago
Well, can you try whether the zoom command already works? In general lanc is a standard and thus the commands stay the same.
Well, can you try whether the zoom command already works? In general lanc is a standard and thus the commands stay the same.
I would, however the zcam is a cinema camera using a non-motor controlled zoom lens, so that particular command wouldn’t trigger anything. They are using their own customized control protocol, as shown in the link I included that gives a breakdown of the various camera commands.
I would guess that the rec start/stop function would the lanc standard, that would be a better starting point. Once I understand how to add the hex/binary commands I could build the rest out myself.
Have you tried? The commands do match.....
Where do you have the commands mapped out? I would like to understand what I’m seeing here before I push things to the camera.
There is no command map. Basically the library sends the commands as specified by the lanc protocol. https://github.com/sensslen/LibLanc/blob/4789109d77b78914f79eb230d19405823da24b53/LibLancBlocking.cpp#L35 for example sends activates a zoom command.
Okay, I see. Is there any way to map custom commands then? Because the ones I would like to execute don’t exist in the standard lanc protocol. Such as the key emulation for navigating the cameras menus, as well as eND+/- and iso+/-
As of now, the simple answer is no. However I've been thinking of seperating the communication layer (transmitting/receiving bytes) from the actual commands. Then this would be very easy. Unfortunately I don't have much time currently so I don't know when I would be able to pull this refactor of. Feel free to jump in here.
The basic Idea here is to have an abstract class called ILancCommand
for example. This class would have a method to get the two bytes to be sent and another method that is called upon receiving a byte. The communication layer (link layer?) would then provide a method to set the next command (similar to the current zoom
method).
I'm happy to report that today I implemented a commanding mechanism. @Morgan-Caldbeck would you mind checking whether the commands present in version 3.0.0 suit your needs? You should be able to implement your own command and both LancBlocking
and LancNonBlocking
will accept them for processing.
Hey there,
I'm reading through some of the code but don't fully understand it yet. I have a Zcam camera, which supports lanc control. I would like to connect to it and control via an Arduino board with various switches and encoders. Seems easy enough with this library to define the pins being used on the board and assign commands to be triggered.
Here is a link to the camera protocol I would like to use. Zcam lanc protocol
If you could walk me through or give me steps to set this up it would be greatly appreciated!