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

CHDK UI version 2.0 ?

  • 542 Replies
  • 106700 Views
*

Offline philmoz

  • *****
  • 3382
    • Photos
Re: CHDK UI version 2.0 ?
« Reply #90 on: 07 / June / 2012, 04:20:24 »
Advertisements
If there are no issues reported with the '@range' addition for script parameters I'll add it to the release-1.0 version this weekend.

It should also be relatively easy to add another option to specify a list of values to select for the parameter - the actual parameter will still be an integer value but the user would see the corresponding named value from the list.

For example (taken from fudgeys motion detect script):
Code: [Select]
@param f Channel (0U,1Y,2V,3R,4G,5B)
@default f 1
@values f U Y V R G B

Here the value in 'f' would range from 0 to 5; but the value seen in the parameter UI would be U, Y, V, R, G, or B.

Is this worth adding?

Phil.
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 #91 on: 07 / June / 2012, 05:10:29 »
Yes, it's worth. Does this support longer words? For example:

@values f alpha betha gamma

If so, then that would help to provide easy to understand script settings.
if (2*b || !2*b) {
    cout<<question
}

Compile error: poor Yorick

*

Offline philmoz

  • *****
  • 3382
    • Photos
Re: CHDK UI version 2.0 ?
« Reply #92 on: 07 / June / 2012, 05:25:23 »
Yes, it's worth. Does this support longer words? For example:

@values f alpha betha gamma

If so, then that would help to provide easy to understand script settings.

Option values can be any length; but only 7 leftmost characters will be displayed (same as current ENUM menu items).

Phil.
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)

*

Offline fe50

  • ******
  • 3139
  • IXUS50 & 860, SX10 Star WARs-Star RAWs
    • fe50
Re: CHDK UI version 2.0 ?
« Reply #93 on: 07 / June / 2012, 05:34:38 »
Is this worth adding?
Yes, absolutely  8)


*

Offline philmoz

  • *****
  • 3382
    • Photos
Re: CHDK UI version 2.0 ?
« Reply #94 on: 07 / June / 2012, 06:56:04 »
It should also be relatively easy to add another option to specify a list of values to select for the parameter - the actual parameter will still be an integer value but the user would see the corresponding named value from the list.

For example (taken from fudgeys motion detect script):
Code: [Select]
@param f Channel (0U,1Y,2V,3R,4G,5B)
@default f 1
@values f U Y V R G B

Here the value in 'f' would range from 0 to 5; but the value seen in the parameter UI would be U, Y, V, R, G, or B.

Is this worth adding?

Phil.


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.

Phil.
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)

*

Offline msl

  • *****
  • 1276
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: CHDK UI version 2.0 ?
« Reply #95 on: 07 / June / 2012, 09:39:48 »
Please test that this (and the @range option) does not cause any problems with existing scripts and that the options work as expected.

Works fine. This is a good improvement of the script functions. I've tested the current trunk version also with older scripts - no problems.

I've noticed a little problem with the menu entry 'Save params'.

- 'Save params' on
- load a script
- make some parameter changes
- 'Save params' off
- camera off
- camera on
- script menu

CHDK retrieves the script parameter from the stored values and not the default values from the script file. This is a problem when you edit scripts.

I know there is menu entry 'Load default param values'. That helps. But the function 'Save params'  works not quite correct.

msl
CHDK-DE:  CHDK-DE links

Re: CHDK UI version 2.0 ?
« Reply #96 on: 07 / June / 2012, 10:38:03 »
CHDK retrieves the script parameter from the stored values and not the default values from the script file. This is a problem when you edit scripts.
I think this is the way it should work.  Otherwise,  how do you setup a script to use values other than the default ones in the code at start-up ?

Maybe what you are looking for is an additional script menu item that says :  Use stored defaults |*| ?

But this is still a little confusing because there are up to 10 sets of stored parameter values allowed and currently the ones that load are the last ones you stored / used.   So when you start your camera after a couple of weeks absence,  you either need to remember what those were or go look in the script menu.

What about something like this :  Use stored default set |N/0-9| ?


Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline msl

  • *****
  • 1276
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: CHDK UI version 2.0 ?
« Reply #97 on: 07 / June / 2012, 11:53:39 »
Maybe what you are looking for is an additional script menu item that says :  Use stored defaults |*| ?

Not quite.

'Save params  [ * ]' should load parameters over 'Parameters set [n]'.
'Save params  [   ]' should load parameter from skript file.

Better would be a renaming to Load/Save param set[ |*]. So we also don't need the entry 'Load default param values'.

Even better:

Use stored default set |N/0-9| ?

Load/Save param set [N/0-9] - no needed 'Parameters set [n]'

msl

CHDK-DE:  CHDK-DE links


Re: CHDK UI version 2.0 ?
« Reply #98 on: 07 / June / 2012, 14:26:47 »
'Save params  [ * ]' should load parameters over 'Parameters set [n]'.
'Save params  [   ]' should load parameter from skript file.

It makes no sense for menu items that start with the word "Save" to determine the "Load" behaviour of the function.

As suggested,  a new menu entry is needed.

Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline msl

  • *****
  • 1276
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: CHDK UI version 2.0 ?
« Reply #99 on: 07 / June / 2012, 14:56:15 »
As suggested,  a new menu entry is needed.

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.

msl
CHDK-DE:  CHDK-DE links

 

Related Topics