chdkptp - alternative ptp client - page 14 - General Discussion and Assistance - CHDK Forum
supplierdeeply

chdkptp - alternative ptp client

  • 1097 Replies
  • 397469 Views
Re: alternative ptp client
« Reply #130 on: 24 / March / 2012, 16:10:59 »
Advertisements
if you are implementing PTP support in SDM (I guess you have it in an unreleased version ?)

I don't know.
I cannot help feeling I would be inundated with questions and problems.

Quote
Whether this works or not has nothing to do with the client.

No, except i am using your client to try to send the command to the official CHDK version to see if switch_mode_ptp works.

If it does, it is a problem with my code that uses the standard function.

*

Offline msl

  • *****
  • 1276
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: alternative ptp client
« Reply #131 on: 24 / March / 2012, 16:16:25 »
I'm not really sure what to do with half press. Ideally, you should be able to use it like the camera shutter button, so you click something to halfpress, then something to either cancel of full shoot.

A button for half pressed shutter is useful for a check (fokus ok?, Tv, Av). You don't need to take a photo.

I think static buttons for capture modes is not the best idea. We can get a camera-dependent mode list with a little script request.

Code: [Select]
function getcammode()
    modemap=require("GEN/modelist")
    capmode=require("capmode")
    local mode_list="" -- string
    --local mode_list={} -- table
    for i=1, #modemap do
        if capmode.valid(modemap[i]) then mode_list=mode_list..modemap[i].."|" end -- string variant
        --if capmode.valid(modemap[i]) then table.insert(mode_list, modemap[i]) end --table variant
    end
    return mode_list
end

With a dropdown box you can select the capture mode.

Code: [Select]
capmode=require('capmode') capmode.set(mode_list[n]) --table variant
I also think, we need more camera data (get_buildinfo(), get_vbatt(), get_free_disk_space() ect.)

msl
CHDK-DE:  CHDK-DE links

*

Offline reyalp

  • ******
  • 13436
Re: alternative ptp client
« Reply #132 on: 24 / March / 2012, 16:37:42 »
A button for half pressed shutter is useful for a check (fokus ok?, Tv, Av). You don't need to take a photo.
Yes, this is true, but being able to half press-> shoot would also be good.
Quote
I think static buttons for capture modes is not the best idea. We can get a camera-dependent mode list with a little script request.

Code: [Select]
function getcammode()
    modemap=require("GEN/modelist")
    capmode=require("capmode")
    local mode_list="" -- string
    --local mode_list={} -- table
    for i=1, #modemap do
        if capmode.valid(modemap[i]) then mode_list=mode_list..modemap[i].."|" end -- string variant
        --if capmode.valid(modemap[i]) then table.insert(mode_list, modemap[i]) end --table variant
    end
    return mode_list
end

With a dropdown box you can select the capture mode.

Code: [Select]
capmode=require('capmode') capmode.set(mode_list[n]) --table variant
I also think, we need more camera data (get_buildinfo(), get_vbatt(), get_free_disk_space() ect.)

msl
Agreed. It has been my plan to collect buildinfo, mode list etc. in gui.update_connection_status.

Vbatt, free space etc would need to be polled. I'm not yet sure how to handle this. The timer probably needs to move out of live gui or the regular gui needs another one.

No, except i am using your client to try to send the command to the official CHDK version to see if switch_mode_ptp works.

If it does, it is a problem with my code that uses the standard function.
It should connect and work (or not) regardless of whether the live view protocol is compatible.
Don't forget what the H stands for.

Re: alternative ptp client
« Reply #133 on: 24 / March / 2012, 16:47:04 »
It should connect and work (or not) regardless of whether the live view protocol is compatible.

No, it tries to initialise live streaming even though all the LiveView boxes are unchecked and I am displaying the console window.

Compiling your branch is going to be messy, starting with lots of errors due to redefinition of integer types in
flt.h that are already defined in my \gcc\include\stdint.h.
« Last Edit: 24 / March / 2012, 17:12:56 by Microfunguy »


*

Offline reyalp

  • ******
  • 13436
Re: alternative ptp client
« Reply #134 on: 24 / March / 2012, 17:56:57 »
No, it tries to initialise live streaming even though all the LiveView boxes are unchecked and I am displaying the console window.
If it fails to initialize the live view, it still connects. The message just tells you live view is not supported. The other functions should still work. This works on my cameras with the r230 chdkptp build and the release branch autobuild.

Quote
Compiling your branch is going to be messy, starting with lots of errors due to redefinition of integer types in
flt.h that are already defined in my \gcc\include\stdint.h.
That probably applies to the trunk as well.
Don't forget what the H stands for.

Re: alternative ptp client
« Reply #135 on: 24 / March / 2012, 18:01:43 »
I am almost reluctant to ask this, but as I have never played with CHDK or Lua I am having some difficulty trying to switch between record and playback when in console mode.

What is the command ?

*

Offline reyalp

  • ******
  • 13436
Re: alternative ptp client
« Reply #136 on: 24 / March / 2012, 18:06:35 »
I am almost reluctant to ask this, but as I have never played with CHDK or Lua I am having some difficulty trying to switch between record and playback when in console mode.

What is the command ?
rec
=switch_mode_usb(1)
play
=switch_mode_usb(0)
Don't forget what the H stands for.

Re: alternative ptp client
« Reply #137 on: 24 / March / 2012, 18:11:19 »
OK, it does switch to Record and Play from the gui.

I now how to find-out why the same commands do not work for the S95 with my code but do for other cameras.

Too bad I will not see 360x240 LiveView (as compared with 320x240).

EDIT

I had tried the above commands but without "=".


*

Offline reyalp

  • ******
  • 13436
Re: alternative ptp client
« Reply #138 on: 24 / March / 2012, 23:23:02 »
= means "run lua code on camera and wait for it to finish"

In r232 and r233 I've added the gui from msl, and a dropdown for capture mode.

The dropdown tries to match the cameras current mode when you connect or switch to rec, but it could easily get out of sync. The whole camera control gui and associated scripting is going to need a re-work at some point.
Don't forget what the H stands for.

*

Offline msl

  • *****
  • 1276
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: alternative ptp client
« Reply #139 on: 25 / March / 2012, 15:08:40 »
In r232 and r233 I've added the gui from msl, and a dropdown for capture mode.

Thanks for that. Works fine.

msl
CHDK-DE:  CHDK-DE links

 

Related Topics