CHDK UI version 2.0 ? - page 11 - General Discussion and Assistance - CHDK Forum

CHDK UI version 2.0 ?

  • 542 Replies
  • 135844 Views
*

Offline fe50

  • ******
  • 3147
  • IXUS50 & 860, SX10 Star WARs-Star RAWs
    • fe50
Re: CHDK UI version 2.0 ?
« Reply #100 on: 07 / June / 2012, 15:40:18 »
Advertisements
I've added this in revision 1901 (trunk).
Please test that this (and the @range option) does not cause any problems with existing scripts and that the options work as expected.
Tested successful on SX10 (#1901), no issues with old scripts found; thanks !

Re: CHDK UI version 2.0 ?
« Reply #101 on: 07 / June / 2012, 16:07:51 »
I have tested on sx130is with the script:

Code: (lua) [Select]
--[[
@param f TST
@default f 2
@values f alva bethe gamov

@param b foo
@default b 0
@range b 0 1

@param x bar
@default x 1
@range x 3 10

@param m minus
@default m 0
@range x -3 4
--]]

print(f)
print(b)
print(x)
print(m)

The list (TST, f value) works great. It returns 0 for the first element, 1 for the second and so on.

The range also works without problems. I tried also:

Code: (lua) [Select]
@param q wtf
@default q 1
@range q 10 1

and this allows me to set q between 0 and 1. A hack to have 0-1 not bool ;p

BTW my CHDK shell said:
Quote
svn: This client is too old to work with working copy '.'; please get a newer Subversion client

but this is the newest one...
if (2*b || !2*b) {
    cout<<question
}

Compile error: poor Yorick

*

Offline dvip

  • ****
  • 451
Re: CHDK UI version 2.0 ?
« Reply #102 on: 07 / June / 2012, 16:54:54 »
Very nice,  I like the '@range' option, and just tested it in lua. :D

How about if in the range I want to skip some numbers, like 1,6,7,8,9. Is it possible?

--[[
@param d = 0,2,3,4,5,10
@default d 0
@range d 0 10
--]]


*

Offline reyalp

  • ******
  • 14080
Re: CHDK UI version 2.0 ?
« Reply #103 on: 09 / June / 2012, 22:54:49 »
How about if in the range I want to skip some numbers, like 1,6,7,8,9. Is it possible?
For a few values, you should be able to use @values for this, no reason the "names" of the values can't be numbers. The values your script receives will still be 0-n, but turning them back into the appropriate value shouldn't be too hard (in lua at least...)

If  you want to be able to use a formula to say what values are allowed, that basically means @params become a new scripting language, which doesn't really seem like the right approach to me.
Don't forget what the H stands for.


*

Offline reyalp

  • ******
  • 14080
Re: CHDK UI version 2.0 ?
« Reply #104 on: 09 / June / 2012, 23:24:18 »
Quote
svn: This client is too old to work with working copy '.'; please get a newer Subversion client
but this is the newest one...
This probably comes form the command line SVN included with CHDKShell. In my installation, this seems to be svn 1.4

You can safely ignore this in the CHDK build, because it's just trying to get the svn revision to put in the build number.
Don't forget what the H stands for.

Re: CHDK UI version 2.0 ?
« Reply #105 on: 10 / June / 2012, 11:54:12 »
I think, we talk at cross-purposes, but we mean the same.

'Load default param values', 'Parameters set' &  'Save params' are the current menu entries. They should be combined into a new (as a replacement) understandable entry.

Use stored default set [N/0-9]Load/Save param set [N/0-9] or another suggestion is a question for the community.
We both agree that the menu text and possibly logic needs work.  I'll see if I can prototype something that makes sense for us to review.

Meanwhile,  I stumbled on something in the SDM documentation that is interesting.  I'm kind of suprised that microfunguy didn't point this out.   There is a @desc macro that can be inserted into parameter set files.  When a set is selected, it apparently displays the text from that macro on the scripting menu.  Now that would be very useful for documenting what the values in each set file were pick for.    In SDM, you have to edit this into the parameter files manually on your PC - we could pretty easily make that on "on camera" function.

Link >  http://stereo.jpn.org/eng/sdm/ubasic.htm  and scroll down to where it says "Parameter Sets".

I also noticed that the time_lapse function in SDM BASIC will allow you to specifiy which parameter set to use via one of the parameters when the function is called.

Ported :   A1200    SD940   G10    Powershot N    G16

Re: CHDK UI version 2.0 ?
« Reply #106 on: 11 / June / 2012, 00:55:36 »
That's interesting. Sets could be stored even in the script itself, for example:

@set 1 a 1 b 3 c 8
@desc 1 "foo bar"

which would mean: set no. 1, params: a=1, b=3, c=8. Description for set 1: "foo bar".
What does it provide - scripts could have named modes. 1 line of description would be enogh for me. I very like this idea.
Parser would change this into appropriate filess.
if (2*b || !2*b) {
    cout<<question
}

Compile error: poor Yorick

*

Offline rudi

  • ***
  • 129
  • A590IS_101B, SX260HS_100B
Re: CHDK UI version 2.0 ?
« Reply #107 on: 11 / June / 2012, 18:14:41 »
BTW my CHDK shell said:
Quote
svn: This client is too old to work with working copy '.'; please get a newer Subversion client
but this is the newest one...
The reason is the new svn-database since Tortoise 1.7. Replace svn command line executables in /gcc4??/ subfolder from chdk-shell. You can get these from Tortoise package (full installation) or from german forum as zip-file.

rudi


*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: CHDK UI version 2.0 ?
« Reply #108 on: 13 / June / 2012, 05:02:51 »
Some more shortcut strangeness (at least to me).

So according to the code if your camera does not have a jogdial and just has a 4 way button controller on the back then you get the following behaviour.

1. Turn on the 'Enable Fast Ev switch?' option in the 'Extra Photo Operations' menu.
2. Exit <ALT> mode and go into record more (not playback).

You should now have 'EV: 0' displayed on the LCD.

Now if you press the Up or Down buttons on the controller it should adjust the exposure compensation of the LCD image preview up and down.

Unfortunately it doesn't seem to block the button press from the firmware so you also get whatever Canon action is assigned to the Up/Down button.

I don't have a camera without a jogdial so I can't really test this although I tried removing the CAM_HAS_JOGDIAL define and testing it on one camera.
When I did that half pressing the shutter cancels the EV override set with the Up/Down buttons so this shortcut seems pretty useless.

I'd be interested to know if this is how it behaves on cameras that don't actually have the rear jogdial.

Phil.

FYI, for cameras that do have a jogdial the same function is linked to the 'Enable Fast Ev switch?'; but in this case you have to rotate the dial while the shutter is half pressed. This actually works on my cameras so long as you wait for the camera to finish doing it's exposure calculation and keep the shutter half pressed while rotating the rear dial (not an easy task).
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

Re: CHDK UI version 2.0 ?
« Reply #109 on: 13 / June / 2012, 08:51:43 »
So according to the code if your camera does not have a jogdial and just has a 4 way button controller on the back then you get the following behaviour.

1. Turn on the 'Enable Fast Ev switch?' option in the 'Extra Photo Operations' menu.
2. Exit <ALT> mode and go into record more (not playback).

You should now have 'EV: 0' displayed on the LCD.

Now if you press the Up or Down buttons on the controller it should adjust the exposure compensation of the LCD image preview up and down.

Unfortunately it doesn't seem to block the button press from the firmware so you also get whatever Canon action is assigned to the Up/Down button.
Tested on the SD940 (a "no jog dial" camera) and confirmed to perform exactly as you described (once I remembered to enable the OSD that is).

In my case,  the Up button is labelled +/-  and so does not interfere but when I use the Down button to adjust the EV I also get the Self Timer menu activating.   Makes the whole short cut quite useless unless you press the set button after each Down button to close the timer menu.

Ported :   A1200    SD940   G10    Powershot N    G16

 

Related Topics