propset investigation tool for chdkptp - General Discussion and Assistance - CHDK Forum  

propset investigation tool for chdkptp

  • 1 Replies
  • 4107 Views
*

Offline reyalp

  • ******
  • 14118
propset investigation tool for chdkptp
« on: 16 / February / 2016, 01:44:37 »
Advertisements
I wrote a chkdptp module propcase testing, posting here in case anyone else finds it useful. I found this more convenient than using camera display or existing camera side scripts.

Use
Code: [Select]
!pt=require'extras/proptools'
to load

You can get a table of propcase values as table using the get function, like
Code: [Select]
!p1=pt.get(0,1000)
The first number is the ID to start from, and the second is the number of values to read.

You can compare tables with a diff-like output, using
Code: [Select]
!pt.comp(p1,p2)
To find propcases associated with menu items, I first run get as above, then change the menu item and do
Code: [Select]
!pt.comp(p1,pt.get(0,1000))
With chdkptp command history, you can get all the values of a menu item by just hitting up arrow and enter each time you change the setting on the camera.

For things that update in half pres, you can send code to be executed before reading the propcase values, like
Code: [Select]
!pt.get(0,1000,"press'shoot_half' sleep(1000)")

You can display a full table using
Code: [Select]
!pt.print(p1)
or save it to a file
Code: [Select]
!pt.write(p1,"props.txt")
« Last Edit: 21 / February / 2016, 16:41:17 by reyalp »
Don't forget what the H stands for.

*

Offline reyalp

  • ******
  • 14118
Re: propset investigation tool for chdkptp
« Reply #1 on: 13 / July / 2016, 16:47:13 »
As of chdkptp r703, CLI commands for this tool are available in the devutil module. You can use it like:

!require'extras/devutil'.init_cli()
dpget
dpcmp -c='press "shoot_half" sleep(500)'

command descriptions are available in help.

(you can still use it with raw ! code if you want)
« Last Edit: 27 / March / 2017, 13:54:16 by reyalp »
Don't forget what the H stands for.

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal