I should have included more details. I have the SDK from Sony for the A7R4 camera that can control the lens focus. I want to build an INDI focuser that can focus Sony cameras. The SDK code uses the Mac Xcode to compile it but the guts of the Sony SDK are supplied in a library and not in source form. I think I can take a generic INDI focuser and add the SDK code plus the few lines of code that I wrote to call the Sony lens interface and make a solution. I had found some instructions for compiling from source on the Mac on Github but they were old and the process didn't work. I am not a software developer and I was not smart enough to figure out why. I could also attempt this on Ubuntu as I have compiled the SDK software there also as Sony provides an linux version of the SDK. In the end tis may not work since the Sony SDK connects to the camera and INDI probably already has a persistant connection to the camera so running the SDK in the middle of that might wreak everything. Libphoto2 supposedly can control the camera focus but when I use gphoto2 to attempt this nothing happens and no errors are generated. So maybe the whole idea of doing this is not going to succeed.
Just a quick follow up. I checked a couple of things this morning on kubuntu 20.04.2 LTS running Kstars 3.5.4 Stable, in the INDI panel for the Sony A7R4, under the actions tab is a manual focus field. This field is missing in 3.5.4 on the Mac.
When you set this field it indeed changes the focus. The range of values is -7 to 7. I you send a -7 it over the focus 7 steps. If you send another -7 it doesn't move as it stood because it must check that the value was no different from the last value set. I also checked this with gphoto2 and it works correctly if you use the command gphoto2 "--set-config=/main/actions/manualfocus=7" So it seems like the functionality is in INDI to create a focuser that will drive the camera.
Currently it checks for manualfocusdrive while what you reported is manualfocus ... I pushed a change that will make it look for that as well. Not sure if it will work though. Please pull from Github 3rd party report (indi-gphoto) compile, install, and check again.
Thank for the time you are taking with me on this. I really appreciate it. So I set my camera to manual focus using a preset and INDI leaves it alone. The test I did was to focus by hand and then set the manual focus to +7 and observed tha the focus moves 7 steps and the set it to -7 and observed that it moved back. If I enter the same number twice the focus moves on the first and ignore the second and subsequent entries.
I actually do not know how to build code on a Mac or Linux system. I installed gphoto2 on the Mac using brew but this version seems stale. I installed in on ubuntu using ap after downloading the code.
I was able to use the script above to build Kstars on Kubuntu. That worked great. I tried the focus tab and the action tab.
If I put a number in the focus tab and click set I get:
Dispatch command error(-1): INDI: Could not find property ABS_FOCUS_POSITION in Sony DSLR DSC-A7r IV (Control)
<setNumberVector device="Sony DSLR DSC-A7r IV (Control)" name="ABS_FOCUS_POSITION" state="Busy" timeout="60" timestamp="2021-08-05T17:56:09">
If I go the the action tap and put a 6 in and click set the focus moves 6 steps in the far direction. If I put a -6 and click set nothing happens. Clicking set twice more causes the focus to return to the initial setting. Additional sets with out changing the value do nothing. It seems kind of erratic. I tried setting debug on but i get: org.kde.kstars.indi: Sony DSLR DSC-A7r IV (Control) : "[INFO] Debug is enabled. "
org.kde.kstars.ekos: "Re-disabling debug logging for Sony DSLR DSC-A7r IV (Control)..."
org.kde.kstars.indi: Sony DSLR DSC-A7r IV (Control) : "[INFO] Debug is disabled. "