DISP key to control OSD info in Playback mode - General Discussion and Assistance - CHDK Forum

DISP key to control OSD info in Playback mode

  • 8 Replies
  • 7170 Views
DISP key to control OSD info in Playback mode
« on: 03 / December / 2011, 22:41:14 »
Advertisements
Currently,  the OSD icons can be made to dissappear in shooting mode based on the display mode selected via the DISP key.  (i.e. you can "de-clutter" the screen when you really need to concentrate on framing your image).  Here's how you enable it :



The attached patch allows you to use that mode to also "de-clutter" the screen in Playback mode.  This is very useful when examining a captured image and you don't want all the icons and other information in the way. Just press the DISP button to turn things off (including the Canon icons).

To make this work,  it is necessary to find the param value that corresponds to the LCD display state for your camera.   Use the Debug data display to watch param values while pressing the DISP key in playback mode ( start by looking at page 5 - 57 is the value for both my cameras). 

Change this line of code on your camera's platform_camera.h  :
Code: [Select]
#undef PARAM_DISPLAY_MODE // param number for LCD display mode when camera in playbackto the param register you found (e.g. 57)
Code: [Select]
#define PARAM_DISPLAY_MODE 57 // param number for LCD display mode when camera in playback
I'd like to submit this patch to the autobuild but it could use some testing / feedback first.

Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: DISP key to control OSD info in Playback mode
« Reply #1 on: 03 / December / 2011, 23:01:38 »
Would it make more sense to put the #undef and comments on usage in camera.h instead of every platform_camera.h?

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: DISP key to control OSD info in Playback mode
« Reply #2 on: 03 / December / 2011, 23:04:17 »
Would it make more sense to put the #undef and comments on usage in camera.h instead of every platform_camera.h?
Doh ... thanks.  :-[

Except,  the point of putting them in platform_camera.h was to get people to think about finding the right value ?  The code does not care if the #undef exists.  And do people really go into inc/camera.h to see what they also need to find ?
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: DISP key to control OSD info in Playback mode
« Reply #3 on: 03 / December / 2011, 23:20:10 »
Would it make more sense to put the #undef and comments on usage in camera.h instead of every platform_camera.h?
Doh ... thanks.  :-[

Except,  the point of putting them in platform_camera.h was to get people to think about finding the right value ?  The code does not care if the #undef exists.  And do people really go into inc/camera.h to see what they also need to find ?


Either way - whether or not anyone will fix this for older cameras is a question :)

I was actually just looking at the gui_draw_osd mess after the earlier IRC discussion.

I have an issue with the current logic, and I think there is at least one cut/paste mistake.

Try this:
- turn on clock and all temperatures
- set OSD - Hide in ? to Both
- set Clock Settings - @Shutter halfpress show to Full

Now in both the minimal DISP mode (need a name for this) and in playback mode the clock and temps are still shown because of the clock_halfpress setting and the bizarre logic in the code.

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: DISP key to control OSD info in Playback mode
« Reply #4 on: 04 / December / 2011, 11:45:40 »
Now in both the minimal DISP mode (need a name for this) and in playback mode the clock and temps are still shown because of the clock_halfpress setting and the bizarre logic in the code.

Okay - think I fixed that and the "cut&paste" error.  I also removed the interlock with grids that I had added - they work as before.  It also no longer touches every platform_camera.h.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: DISP key to control OSD info in Playback mode
« Reply #5 on: 06 / December / 2011, 23:06:46 »
Updated after comments from philmoz. 
  • Fixes bug where temperature display could not be turned off unless all OSD was off.
  • Also fixes size of param value returned from state of DISP key from long to short.
  • Moves check for OSD hidden to its own subroutine.

Per philmoz,  the logic for recreview_hold to display OSD in review mode does not appear to work with current cameras.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: DISP key to control OSD info in Playback mode - updated patch file
« Reply #6 on: 09 / December / 2011, 13:46:22 »
Per philmoz,  the logic for recreview_hold to display OSD in review mode does not appear to work with current cameras.

New version with corrections / changes suggested by philmoz. 
  • includes correction in core/main.c from philmoz so that <ALT> symbol and CHDK menus are visible during "record view hold" mode (i.e. when you press Func/Set to hold the review image after taking a picture).
  • fixes bug in previous patch where temperature display could not be turned off unless all OSD was off.
  • also now uses correct size of param value returned from state of DISP key (short instead of long)
  • Moves check for OSD hidden to its own subroutine.
  • sneaks in a 3 line debug in spy_task() for new developer convenience - #defined so it does not compile by default

Note that the OSD state in record view hold mode will match whatever was active in shooting mode when the shot was taken.   So as you scroll through display modes, the OSD state stays constant.  Could not find a prop_case value to tell me what state was being used.  Will look at param values later.

UPDATE :  its param value 58 on my camera - one more than the param value for DISP key state in playback mode.  I wonder if its safe to assume 1+ for all cameras.


« Last Edit: 09 / December / 2011, 13:53:11 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

Re: DISP key to control OSD info in Playback mode
« Reply #7 on: 09 / December / 2011, 20:48:42 »
Added #define and code to handle record view hold mode of DISP key.  Selecting the DISP option in the menu now causes the OSD to track the DISP key state in all three modes.

I think this is as done as its going to be.

Oh yea - the colored icon colors are different again in the recview_hold mode.  I guess we will just have to live with that.


Ported :   A1200    SD940   G10    Powershot N    G16

DISP key to control OSD info in Playback mode : released in 1484
« Reply #8 on: 15 / December / 2011, 21:57:49 »
Released in trunk version 1484
http://chdk.setepontos.com/index.php?topic=650.msg77980#msg77980

To include this patch for a specific camera,  the following values need to be set in that camera's platform_camera.h file :

Code: [Select]
#define PARAM_DISPLAY_MODE1  nnnn     // param number for LCD display mode when camera in playback
#define PARAM_DISPLAY_MODE2  xxxx     // param number for LCD display mode when camera in record view hold mode
Ported :   A1200    SD940   G10    Powershot N    G16

 

Related Topics


SimplePortal © 2008-2014, SimplePortal