asalamon74 / pktriggercord

Remote control for Pentax DSLR cameras
http://pktriggercord.melda.info
GNU Lesser General Public License v3.0
103 stars 38 forks source link

Changing settings manually while camera is connected? #44

Open chrisabbott opened 4 years ago

chrisabbott commented 4 years ago

Hey, apologies if this isn't the right place for this question. I'm currently running Pktriggercord on a Raspberry Pi, which is connected to my K-1 and saves each buffer to disk whenever I fire the shutter. I've managed to write a script that uses camera_connect to save each buffer to disk whenever I take a photo, and this works fairly well (as long as I reinitialize the connection after each shot), however, I now need to change my settings manually while my camera is connected. IE; I should be able to change ISO, F-stop, Shutter speed, etc. using the control dial on my camera while my camera is plugged in and connected. Does anybody have an idea if this is currently possible? If so, could you provide some guidance on how to do this? I'm more than happy to dive further into pslr.c if there is a function, or set of functions, that can do this.

asalamon74 commented 4 years ago

Yes, this is the right place.

Are you referring to this function: https://github.com/asalamon74/pktriggercord/blob/master/pktriggercord-servermode.c#L54? Servermode is designed to listen on a port a wait for commands like set_shutter_speed. Are you using this? It should automatically recognize if you change something manually on the camera, but probably you have to use "update_status" before taking the picture.

The other possibility is to use the functions defined in https://github.com/asalamon74/pktriggercord/blob/master/pslr.c as you already mentioned. Probably you need to call https://github.com/asalamon74/pktriggercord/blob/master/pslr.c#L472 after you change things manually.