Bloodevil / sony_camera_api

sony camera remote api
http://developer.sony.com/develop/cameras/
MIT License
245 stars 60 forks source link

Unable to 'setShootMode' #10

Closed mungewell closed 9 years ago

mungewell commented 9 years ago

Not sure how I should be issuing commands, but the following fails on my cameras

      camera = SonyAPI()
      mode = camera.getAvailableShootMode()
      if (mode['result'])[0] != 'movie':
         if 'movie' in (mode['result'])[1]:
            camera.setShootMode("movie")
         else:
            print "'movie' mode not supported"

Which seems to be getting fragmented to the following in 'def _cmd(self, method=None, param=[]):',

{'version': '1.0', 'params': ['m', 'o', 'v', 'i', 'e'], 'method': 'setShootMode', 'id': 1}
mungewell commented 9 years ago

Figured that the command should be:

      if (mode['result'])[0] != 'movie':
         if 'movie' in (mode['result'])[1]:
            camera.setShootMode(["movie"])
         else:
            print "'movie' mode not supported"

But 'pysony.py' should clear the params as it effects next calls.

        if param:
            self.params["params"] = self._truefalse(param)
        else:
            self.params["params"] = []
mungewell commented 9 years ago

I'm in the process of converting one of my other applications (pyDataMatrixScanner) to work as an GUI example, and I'm happy to say it's mostly working on Linux and Windows.... I'll leave this here as a tease ;-)

pyliveview_tease

Bloodevil commented 9 years ago

wow nice job!! thanks and I will patch that you said things. thanks for using!!