CHDK PTP interface - page 35 - General Discussion and Assistance - CHDK Forum supplierdeeply

CHDK PTP interface

  • 1244 Replies
  • 529491 Views
*

Offline hwntw

  • ***
  • 159
Re: CHDK PTP interface
« Reply #340 on: 04 / January / 2011, 16:44:51 »
Advertisements
Deleted by a craven coward
« Last Edit: 28 / January / 2011, 18:06:07 by hwntw »
Ixus 300HS S100


Windows 10

*

Offline reyalp

  • ******
  • 14121
Re: CHDK PTP interface
« Reply #341 on: 04 / January / 2011, 21:30:35 »
No, no, no, bad conclusion: if we are going to end up with more memory from this exmem thingy, then use it for compiled PTP (and better zebra for Ixus 95).  CHDK is for photographers, scripting is for programmers
I disagree completely with this, but it's off topic to this thread. Feel free to start a new one in general discussion about CHDK development directions.

If I have any say in the matter, scripting will remain a core part of CHDK, and PTP will be enabled by default as soon as it can be cleanly supported across cameras.
Don't forget what the H stands for.

*

Offline ultimA

  • ***
  • 137
Re: CHDK PTP interface
« Reply #342 on: 05 / January / 2011, 00:05:10 »
In my oppinion PTP is just as much a power-user feature as scripting, not much point in arguing which is more for photographers.

But to stay on the topic, I do agree to keep PTP-functionality minimal. However, I would add just two more commands: 1) shooting a picture and 2) transferring a single frame from the live buffer. Note that I'm NOT proposing webcam-like streaming or anything that would require real-time transfer rates. Merely a request to send over a single frame from the current live buffer. I'd propose these in addition to what is already there to be available without scripting, rest to be scripted. Reason is that then the PTP feature set would be enough and adaquate for basic computer controlled camera without the overhead of scripts.

*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: CHDK PTP interface
« Reply #343 on: 06 / January / 2011, 04:40:05 »
But to stay on the topic, I do agree to keep PTP-functionality minimal. However, I would add just two more commands: 1) shooting a picture and 2) transferring a single frame from the live buffer. Note that I'm NOT proposing webcam-like streaming or anything that would require real-time transfer rates. Merely a request to send over a single frame from the current live buffer. I'd propose these in addition to what is already there to be available without scripting, rest to be scripted. Reason is that then the PTP feature set would be enough and adaquate for basic computer controlled camera without the overhead of scripts.

If PTP must be kept somehow useful without scripting, then instead of a shooting command I'd go with access to half+full shutter press/release (or even better, to the entire keyboard). But my vote would go against that.

IMO there's no point in making PTP that doesn't require scripting, because UBASIC is small (11.6 KiB according to http://chdk.setepontos.com/index.php?topic=5793.msg56643#msg56643, probably hasn't changed immensely after the recent patches). AFAIK, CHDK PTP doesn't currently support UBASIC, but that's not the only thing that's not quite there yet -- Lua is just so much more powerful that it hasn't made any sense to use anything but it so far.

My understanding is that most users who do not want scripting at all don't want it because it complicates camera usage, mainly because of the alt+shutter shortcut which is sort of a trap for beginners and those that don't know CHDK is running on the camera someone gave them. For those users, disabling the script start and menu shortcuts (and optionally menu entries) suffices. This is something that should be easy for a developer to disable for a custom build, but in the long run is solved by user settable shortcut key mapping.

So basically my vote would go for using scripting for all PTP commands that make sense to be implemented as scripts. In a PC side application, use UBASIC commands internally whenever possible since Lua may not be available. Users will not know they are running tiny scripts all over when clicking buttons on a PC GUI and shouldn't care either as long as the camera zooms and shoots as commanded. And if it happens that we really do get some RAM for CHDK on all cameras using that new EXMEM stuff and can use it to solve memory issues, then my vote changes to requiring Lua for PTP.


As for live view, ewavr already implemented it in real time (more or less, depending on USB speed). If my memory serves, the main obstacle for adding that to the trunk CHDK PTP is that it needs some work to make it more generic across cameras with different sorts of live view buffers, resolutions and colors -- something that probably doesn't become much easier even if it's not in real time.


*

Offline reyalp

  • ******
  • 14121
Re: CHDK PTP interface
« Reply #344 on: 06 / January / 2011, 12:52:26 »
If PTP must be kept somehow useful without scripting, then instead of a shooting command I'd go with access to half+full shutter press/release (or even better, to the entire keyboard). But my vote would go against that.
As I said, it would be quite easy (almost trivial) to add "action stack" and/or levent support. I'm pretty tempted to do this, just because it would be a tiny amount of code, and would allow basic camera control natively.

One useful part that is missing, and would also be non-trivial to do in ubasic is directory listing. With directory listing, we can make a nice gui for file transfer, which will really help people getting DNG off of multi-paritition cards and similar scenarios. Directory listing can be done in lua, but if we are going to offer non-lua functionality, it seems like this should be included.
Quote
AFAIK, CHDK PTP doesn't currently support UBASIC, but that's not the only thing that's not quite there yet -- Lua is just so much more powerful that it hasn't made any sense to use anything but it so far.
Agreed.
Quote
My understanding is that most users who do not want scripting at all don't want it because it complicates camera usage, mainly because of the alt+shutter shortcut which is sort of a trap for beginners and those that don't know CHDK is running on the camera someone gave them.

The other issue is memory. Excluding lua could allow some cameras that experience memory related shutdowns to operate normally (although at least some of these have turned out to be coding errors and there's more fat that can be trimmed without losing lua). Ubasic is small enough that it doesn't really matter, IMO.
Quote
As for live view, ewavr already implemented it in real time (more or less, depending on USB speed). If my memory serves, the main obstacle for adding that to the trunk CHDK PTP is that it needs some work to make it more generic across cameras with different sorts of live view buffers, resolutions and colors -- something that probably doesn't become much easier even if it's not in real time.
It has always been my intention to add this back. This is one of the main reasons I've started a new gui tool.
Don't forget what the H stands for.

Re: CHDK PTP interface
« Reply #345 on: 07 / January / 2011, 18:59:08 »
@asm1989 The bracketing features still don't work if you shoot with the "Custom Timer" option.

Strange, because they work if you shoot with the "Drive Mode" set in continuous, but that is not wanted in some cases because you must have your finger in the shutter.

Re: CHDK PTP interface
« Reply #346 on: 08 / January / 2011, 11:34:10 »
This adds the necessary functions for mode changing on most dryos cameras. I haven't turned it on in camera.h, but this should give us what we need to support PTP out of the box on almost all cameras.

@reyalp So at this point do I simply need to use the latest trunk release,  add  #define  CAM_CHDK_PTP in the appropriate spot in camera.h,  enable the OPT_PTP box in the CHDK-Shell compile options, rebuild and start testing ? 
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline reyalp

  • ******
  • 14121
Re: CHDK PTP interface
« Reply #347 on: 08 / January / 2011, 15:47:15 »
This adds the necessary functions for mode changing on most dryos cameras. I haven't turned it on in camera.h, but this should give us what we need to support PTP out of the box on almost all cameras.

@reyalp So at this point do I simply need to use the latest trunk release,  add  #define  CAM_CHDK_PTP in the appropriate spot in camera.h,  enable the OPT_PTP box in the CHDK-Shell compile options, rebuild and start testing ?
Probably. The entry points for the various functions may not have been identified correctly on your camera, but most should be OK.

Edit:
If people can report which cameras have been tested successfull (including mode switching through PTP) that would be helpful.

A540 and D10 work correctly. Most vxworks cameras should be fine, since they don't need extra functions to switch.
Don't forget what the H stands for.


*

Offline msl

  • *****
  • 1280
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: CHDK PTP interface
« Reply #348 on: 08 / January / 2011, 19:07:32 »
If people can report which cameras have been tested successfull (including mode switching through PTP) that would be helpful

Successfully tested on A495, A590, A610 (VxWorks), A650, A720, Ixus95, Ixus 100 (not clearly), Ixus970, S5, SX200.
CHDK-DE:  CHDK-DE links

Re: CHDK PTP interface
« Reply #349 on: 08 / January / 2011, 21:10:44 »
If people can report which cameras have been tested successfull (including mode switching through PTP) that would be helpful.
No luck for the SD940 with just enabling CAM_CHDK_PTP.  Camera is detected by PC but crashes as you try to open folders.

ROMLOG.TXT attached if that helps any.

EDIT :  Hmmmm ... CreateTask_init_chdk_ptp() exists in some copies of boot.c.  Time to see what that's all about.
« Last Edit: 08 / January / 2011, 21:13:24 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal