ptpcam gui - page 6 - General Help and Assistance on using CHDK stable releases - CHDK Forum  

ptpcam gui

  • 95 Replies
  • 59819 Views
Re: ptpcam gui
« Reply #50 on: 28 / December / 2011, 09:38:08 »
Advertisements
For convenience, I am hacking the ptpCamGui code to test certain aspects of a child process.
(I will refer to ptpcamGui as AU3).

AU3 calls createConsole() in the DLL to spawn the ptpcam child process.
It creates pipes to it and redirects ptpcam STDIO to itself.
In ptpcam, you read and write using STDIN and STDOUT as usual.
I have some code in ptpcam that is in an endless loop, checking the input buffer for a character every 100 msec using PeekConsoleInput().
When a character is received it continues with the rest of the code.
That works fine in console mode but not with AU3.

First of all, should PeekConsoleInput() still work with a redirected input ?

Even though there is an option to display ptpcam console it is of limited use because its output is redirected.

Is there any way to display debugging info on the ptpcam console ?

Re: ptpcam gui
« Reply #51 on: 03 / July / 2012, 10:54:13 »

when I run PTPCamGUI 2.1.121 it identifies my camera (below), however is stuck saying "wait for camera" and resetting ">>reset", waiting again, ...

any idea what I'm missing?
 

** init() start ...
>> version << ptpcam: 2.0
camera: 2.3 (Length: 24)
>> script-support << script-support:0x1 lua=yes (Length: 26)
>> luar not(os.stat("A/CHDK/LUALIB/lptpgui.lua")==nil) << script:1
1:ret:false (Length: 21)
>> upload lptpgui.lua A/CHDK/LUALIB/lptpgui.lua <<  (Length: 0)
>> luar get_buildinfo() << script:2
2:ret:'platform   a2200
build_date   Jul  2 2012
build_number   1.1.0
build_time   07:03:22
version   CHDK
platsub   100d
build_revision   1942
platformid   12842
os   dryos
' (Length: 176)
is DryOS=True
>> luar (type(get_video_details)=='function') << script:3
3:ret:false (Length: 21)
use Modules=False
DE version=False
>> luar get_config_value(67) << script:4
4:ret:1 (1) (Length: 21)
current powersave mode: 1
>> luar get_zoom_steps() << script:5
5:ret:8 ( (Length: 21)
>> luar require("lptpgui").getcammode()
>> luar get_raw()
>> help << q quit                         quit program
h help                         list commands
r reset                        reconnect to camera
  version                      get CHDK PTP version (ptpcam and camera)
  shutdown                     shutdown camera (soft)
  reboot                       reboot camera
  reboot <filename>            reboot camera using specified firmware update
  reboot-fi2                   reboot camera using default firmware update
m memory <address>             get byte at address
m memory <address>-<address>   get bytes at given range
m memory <address> <num>       get num bytes at given address
  set <address> <long>         set long value at address
c call <address> <arg1> ...    call function at address with given arguments
  upload <local> <remote>      upload local file to camera
  download <remote> <local>    download file from camera
  mode <val>                   set mode (0=playback,1=record)
  lua <code>                   execute lua code
  luar <code>                  execute "return <code>" and retreive result
  script-support               show supported script interfaces
  script-status                show script execution and message status
  getm                         get messages / return values from script
  putm <message>               send <message> to running script (Length: 1359)
* enable keys for GUI control: >> lua post_levent_to_ui(4484)
** init() successful

>> reset
>> reset
>> reset
>> reset
>> reset
>> reset
>> reset
>> reset
>> reset
>> reset
>> reset
>> reset
>> reset
>> reset
>> reset
>> reset
>> reset
>> reset
>> reset
>> reset
>> reset
>> reset
>> reset
>> reset
>> reset
>> reset
>> reset
>> reset
>> reset <<  (Length: 0)
** init() start ...
>> version << ptpcam: 2.0
camera: 2.3 (Length: 24)
>> script-support << script-support:0x1 lua=yes (Length: 26)
>> luar not(os.stat("A/CHDK/LUALIB/lptpgui.lua")==nil) << script:1
1:ret:true (Length: 20)
>> luar require("lptpgui").version
>> upload lptpgui.lua A/CHDK/LUALIB/lptpgui.lua
** init() fail
>> reset
>> reset
>> reset
>> reset
>> reset

*

Offline msl

  • *****
  • 1280
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: ptpcam gui
« Reply #52 on: 03 / July / 2012, 14:54:32 »
The initialization seems to be working principle. Maybe something is still missing in the porting of the A2200. What says the Lualib test script?

You can try to get a connection with the command line program ptpcam.exe. Or you try it with reyalp's alternative PTP client.

msl
CHDK-DE:  CHDK-DE links

Re: ptpcam gui
« Reply #53 on: 04 / July / 2012, 15:43:45 »
I tried a different camera and it works fine.
Does this have live view- if so how do I see it.


*

Offline msl

  • *****
  • 1280
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: ptpcam gui
« Reply #54 on: 04 / July / 2012, 16:03:55 »
Does this have live view

No. For live view use the alternative PTP client.

msl
CHDK-DE:  CHDK-DE links

Re: ptpcam gui
« Reply #55 on: 04 / July / 2012, 16:18:25 »
thx
just d/l'd it:
got this message though:

update mode dropdown nil
error: a script is already runningupdate mode dropdown nil
WARNING: camera live view protocol not supported by this client, live view disabledERROR: a script is already running
ERROR: a script is already running
update mode dropdown nil
error: a script is already runningupdate mode dropdown nil
WARNING: camera live view protocol not supported by this client, live view disabledERROR: a script is already running
update mode dropdown nil
branchopen_cb 0populate branch 0 A/ERROR: a script is already running
ERROR: a script is already running
ERROR: a script is already running
ERROR: a script is already running

*

Offline msl

  • *****
  • 1280
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: ptpcam gui
« Reply #56 on: 04 / July / 2012, 16:31:11 »
There is no relationship with ptpCamGui.

Double posts are painful. ;)
CHDK-DE:  CHDK-DE links

Re: ptpcam gui
« Reply #57 on: 04 / July / 2012, 16:34:47 »
sorry that was from the alternative PTP client you had mentioned.
My apologies for the double post.
« Last Edit: 04 / July / 2012, 17:01:42 by cgott4242 »


Re: ptpcam gui
« Reply #58 on: 05 / July / 2012, 23:57:58 »
The ptpgui works fine.
However when I unplug it from the computer and try to take a regular picture
it doesn't take a regular picture.  If turns on fine, nand things appear to be workign,but nothing seems to happen when I prigger the shutter.
What do I need to do?
thx

*

Offline msl

  • *****
  • 1280
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: ptpcam gui
« Reply #59 on: 06 / July / 2012, 04:10:21 »
You mean the shutter on the camera?

That does not work when you have a PTP connection and is normal. The PTP connection locks the native capture functions. You can control the camera only via PTP client software.

msl
CHDK-DE:  CHDK-DE links

 

Related Topics