CHDK UI version 3.0 ? - General Discussion and Assistance - CHDK Forum
supplierdeeply

CHDK UI version 3.0 ?

  • 35 Replies
  • 18867 Views
CHDK UI version 3.0 ?
« on: 04 / November / 2017, 12:58:03 »
Advertisements
Building on the CHDK UI 2.0 thread from a few years ago, I'm going to suggest we move on to a new GUI interface. This project stems from my recurring concern that CHDK is about photography and yet it doesn't really assist much with the most common aspect of just taking pictures. 

I have make a couple of observations over the years :
  • Most of the CHDK <ALT> screen is empty. It really does not let you do much other than load the CHDK menu, go to the Script menu, or start the current script running.
  • Using CHDK to control exposure is extremely primitive. There is no real M mode as, while you can override Tv, Av, or Sv individually, CHDK leaves the other parameters under Canon control. And Tv or Av priority modes are also missing.
  • The interface for Powershots that have M modes is actually confusing and a bit hard to use.

So I'd like to suggest an updated CHDK UI.  Naturally it will not be pretty - CHDK screen drawing has its limits.  But it does let you use the <ALT> mode screen to set a shooting mode (camera default, Tv priority, Av Proirity, M), pick exposure parameters,  load a script, or enable/disable RAW/DNG, Histogram, Zebra, Edge Overlay.  All from the <ALT> screen without navigating the huge and intimidating CHDK Menu structure.   

The GUI works with just the up/down/left/right arrow keys and the Func/Set key so should work on every Powershot. The yellow box in the attached images is the "cursor".  You move to what you want to change, click Func/Set, and then use the up/down keys to change that value.  Pressing Func/Set again sets the value and returns you to cursor mode.  And you can change the current script by navigating to that field and clicking Func/Set to bring up the script menu (by default the GUI starts the cursor there so pressing Func/Set on entry to <ALT> works like before).


Currently it's configurable so that it can be disabled or loaded via a specified key, or simply when you enter <ALT>.   The override values work just like the current menu based ones - except all three are set in anything but Canon mode.  I have it setup to allow different "themes" (colors, font sizes, outline boxes, labels, etc) but have not created many standard ones yet.

Rather than try to describe a GUI any further with just words,  I'm sharing a patch file here with anyone interested. I'll also do an "on request" build of a version for a specific camera & firmware version for anyone not setup to build CHDK from source.  PM me with your camera details.

To keep this short,  I'll post a seperate list of changes & upgrades I've been thinking about.

This is far from finished - as Sir Winston Churchill said  "Now this is not the end. It is not even the beginning of the end. But it is, perhaps, the end of the beginning."

EDIT : note that the patch file will only build the GUI into camera models with the appropriate entries in their platform_camera.h files :
Code: [Select]
    #define CAM_ALT_GUI_AVAILABLE           1       // enables building the ALT GUI for this camera
    #define CAM_ALTGUI_BUTTON_NAMES         { "Off","on ALT", "Video",    "Erase",   "Face"};         //optional
    #define CAM_ALTGUI_BUTTON_OPTIONS       { -1,     0,       KEY_VIDEO,  KEY_ERASE, KEY_FACE };          //optional
« Last Edit: 13 / January / 2018, 16:50:50 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

CHDK UI version 3.0 ?
« Reply #1 on: 04 / November / 2017, 12:58:49 »
Known Bugs :
  • can't currently use the Playback key to toggle Gui On/Off
  • does not handle wide / non-standard LCD's properly
  • touch interface not working

Questions :
  • what happens if ALT key is same as GUI key?

To Do :
  • exposure meter (update meter on half press in CHDK mode?)
  • allow user to shoot in ALT mode (user configurable choice for the shutter button to either launch the current script or shoot while in <ALT> mode. Or decide base on cursor position- if on script, launch script. Otherwise shoot.)
  • disable CHDK Enhanced Photo Operations overrides when GUI ALT mode enabled
  • disable CHDK keyboard shortcut keys (all of them) when GUI ALT mode enabled
  • allow Av mode settings to work intellegently with combos of ND filter and adjustable aperture (camera dependent)
  • add controls for ND filter,  Ev adjust,  manual flash modes, manual focus
  • add simple delay / interval / bracketing mode enable functions from GUI (no script needed)
  • user configurable choice of available shortcuts (rather then just the current four - e.g. enable/disable USB remote or Custom Auto/ISO)
  • fancier gui setup - outline boxes for example
  • an AutoISO mode based on the one in kap_uav.lua
  • pretty non-ALT mode OSD (something to show how the ALT mode Gui is currently configured
  • non-ALT mode exposure adjustment (wish list - could be very confusing)
  • use the Tv,Av,Sv values found in each camera's shooting.c file aperture_sizes_table[ ], shutter_speeds_table[ ],  iso_table[ ]
  • needs a larger font theme for old eyes and the limited LCD quality of older powershots. Might be enough just to be taller?
« Last Edit: 04 / November / 2017, 13:29:46 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

Re: CHDK UI version 3.0 ?
« Reply #2 on: 04 / November / 2017, 14:01:57 »
I probably should have pointed out that there is a new CHDK menu to configure UI 3.0 mode.



It's buried under the CHDK Settings -><ALT> Mode GUI menu item.
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline srsa_4c

  • ******
  • 4451
Re: CHDK UI version 3.0 ?
« Reply #3 on: 05 / November / 2017, 17:32:37 »
First, it's nice to finally see this work, it definitely looks promising.
I have played with it briefly and found a bug.
On the g10, the following steps are needed to reproduce (some may not be necessary):
- start cam in playback mode, go into shooting mode (Canon mode was P on mine)
- on the ALT GUI, set mode to M
- exit ALT and shoot a picture
- re-enter the ALT GUI, use the scrollwheel to move the "cursor" to the right
- after reaching "edge", the cursor vanishes and the camera may or may not crash
- crash seems to happen in gui_altmode_kbd_process(), around a blx instruction. I believe that corresponds to this call (r0 is -1 at time of crash):
gui_altmode_layout[idx].select(-1)
Perhaps something becomes invalid there.


Re: CHDK UI version 3.0 ?
« Reply #4 on: 05 / November / 2017, 18:19:10 »
I have played with it briefly and found a bug.
<snip>
Perhaps something becomes invalid there.
Thanks - I'll take a look.  A detailed problem description like that will make it a lot easier I suspect.  Sounds a lot like I have something that does not reinitialize properly on re-entry to <ALT> mode.

FWIW, I'm expecting the way it's hooked into the shooting sequence stuff to be a little rough.  There is probably a better way  - I have not spent a lot of time on it.

EDIT :  can reproduce easily on my G10 too. I don't believe I've actually played with jog dial code I put in there during a mass coding session so I guess this is not a big surprise.
« Last Edit: 05 / November / 2017, 18:37:57 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline reyalp

  • ******
  • 14080
Re: CHDK UI version 3.0 ?
« Reply #5 on: 06 / November / 2017, 00:38:43 »
Very nice. This really does seem like a good direction for a more intuitive, user friendly interface for CHDK exposure control etc :D

I played with this a little bit on sx160 and elph130. I'll try to put together some more big picture comments later, but here's a few random notes to start:

If the key is set to Video, pressing video outside of alt mode enables the GUI and starts recording a video. Pressing video again closes the gui, but leaves <alt> displayed (and this isn't just a draw issue, it's in a weird state)

I expected histogram to show the histogram in the GUI, but it doesn't show until you return to regular alt or shooting mode.

There are two blank spots that can be highlighted to the left of ISO

Script name can overlap the <alt> indicator. I'm not sure this mode needs an <alt> at all.

I initially expected left/right to switch between values rather than up/down. That's how CHDK menu "enum" values work, how similar items in the canon menu work. However, with the items arranged horizontally, allowing left/right to select item convenient.
Don't forget what the H stands for.

Re: CHDK UI version 3.0 ?
« Reply #6 on: 06 / November / 2017, 00:56:01 »
I'll try to put together some more big picture comments later, but here's a few random notes to start:
I spent a bunch of time thinking about how to make it all "CHDK Compliant". Something new that would not change the metaphors from the past. So compromises were made to try and do that.  And then I finally decided to just publish and let the community work it out.

Quote
If the key is set to Video, pressing video outside of alt mode enables the GUI and starts recording a video. Pressing video again closes the gui, but leaves <alt> displayed (and this isn't just a draw issue, it's in a weird state)
Added to the bug list.

Quote
There are two blank spots that can be highlighted to the left of ISO
Yup - left there on purpose.  Think in terms of user expansion!  Space for ND filter / exposure meter / instant scripts (per my todo list) / Ev offset.

Quote
Script name can overlap the <alt> indicator. I'm not sure this mode needs an <alt> at all.
Last minute addition bites me again. I had the <ALT> indicator spliced onto the name of the script but then I made it into it's own field (so that a theme could choose not to use it).  Looking at the patch, that change apparently did not make it through.  One of many things still to correct I guess.

Quote
I initially expected left/right to switch between values rather than up/down. That's how CHDK menu "enum" values work, how similar items in the canon menu work. However, with the items arranged horizontally, allowing left/right to select item convenient.
Easy enough to change. Or the Up key and Right Key could just do the same thing.

So many choices ....
« Last Edit: 06 / November / 2017, 01:00:18 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

Re: CHDK UI version 3.0 ?
« Reply #7 on: 11 / November / 2017, 11:57:49 »
Updated patch attached to the first post in this thread.  In addition to the reply's noted below, the "mini" mode now works properly.

I have played with it briefly and found a bug.
Fixed.  Thanks again for testing and reporting it.

Script name can overlap the <alt> indicator. I'm not sure this mode needs an <alt> at all.
I left that there in the default theme in keeping with our usual desire to not make dramatic changes. In the most recent patch,  I've also added a Theme that does not display the <ALT> logo. See what you think- it looks kind of naked.

If the key is set to Video, pressing video outside of alt mode enables the GUI and starts recording a video. Pressing video again closes the gui, but leaves <alt> displayed (and this isn't just a draw issue, it's in a weird state)
...
I expected histogram to show the histogram in the GUI, but it doesn't show until you return to regular alt or shooting mode.
Still "to do"
Ported :   A1200    SD940   G10    Powershot N    G16


Re: CHDK UI version 3.0 ?
« Reply #8 on: 11 / November / 2017, 14:14:49 »
If the key is set to Video, pressing video outside of alt mode enables the GUI and starts recording a video. Pressing video again closes the gui, but leaves <alt> displayed (and this isn't just a draw issue, it's in a weird state)
Fixed. It would behave this way with any key used to enable the GUI.

The logic to ignore keys when not in <ALT> mode is a little convoluted.  I added a check for kbd_blocked to gui_kbd_process() in gui.c.  Straight forward and not dependent on the existence of a non-null function address buried in a gui mode structure.  I don't think this will cause any unintended side effects.

Quote
I expected histogram to show the histogram in the GUI, but it doesn't show until you return to regular alt or shooting mode.
Actually, the entire OSD was not being drawn - the histogram was just part of it.

Fixed now - but one side effect is that the OSD elements are constantly being redrawn and will override the GUI area if they are positioned within it.

Updated patch (r3) attached to the first post in this thread.

Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline msl

  • *****
  • 1280
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: CHDK UI version 3.0 ?
« Reply #9 on: 11 / November / 2017, 16:35:22 »
Nice idea - good work! That makes CHDK more intuitive. :)

So far I have tested only a little bit with the SX220 (a wide screen camera). It works as described. I just defined the video button as gui button
Code: [Select]
    #define CAM_ALT_GUI_AVAILABLE               1       // enables building the ALT GUI for this camera
    #define CAM_ALTGUI_BUTTON_NAMES             { "Off","on ALT", "Video"};
    #define CAM_ALTGUI_BUTTON_OPTIONS           { -1,     0,       KEY_VIDEO};

It would be very nice if you could adjust the position of this gui area in the layout editor. I do not know if that would be possible.

Btw, I got a compiler warning (gcc 4.9.3):
Code: [Select]
../../../../core/gui_altmode.c: In function 'gui_altmode_draw':
../../../../core/gui_altmode.c:603:5: warning: implicit declaration of function 'console_draw' [-Wimplicit-function-declaration]
     console_draw(enforce_redraw);

msl
CHDK-DE:  CHDK-DE links

 

Related Topics