fix for common menu redraw issue ? Changeset 1250 - CHDK Releases - CHDK Forum

fix for common menu redraw issue ? Changeset 1250

  • 12 Replies
  • 9579 Views
fix for common menu redraw issue ? Changeset 1250
« on: 29 / July / 2011, 19:48:54 »
Advertisements
@philmoz :    Do you have any pointers to share for use with all the camera ports so that they can utilize your changes in changeset 1250 and implement automatic menu redraw ?
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: fix for common menu redraw issue ? Changeset 1250
« Reply #1 on: 29 / July / 2011, 20:01:47 »
@philmoz :    Do you have any pointers to share for use with all the camera ports so that they can utilize your changes in changeset 1250 and implement automatic menu redraw ?


Just add '#define CAM_DETECT_SCREEN_ERASE 1' to platform_camera.h will enable it.

I haven't had any problems on the G12/SX30/IXUS310 and the current test versions for SX130 have it enabled as well.

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: fix for common menu redraw issue ? Changeset 1250
« Reply #2 on: 29 / July / 2011, 20:32:58 »
Just add '#define CAM_DETECT_SCREEN_ERASE 1' to platform_camera.h will enable it.

I haven't had any problems on the G12/SX30/IXUS310 and the current test versions for SX130 have it enabled as well.

Works great with the IXUS120-SD940.  Patch file on the way.

Is it worth just updating all cameras ?  This has been a major annoyance for so many people.
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: fix for common menu redraw issue ? Changeset 1250
« Reply #3 on: 29 / July / 2011, 20:49:54 »
Just add '#define CAM_DETECT_SCREEN_ERASE 1' to platform_camera.h will enable it.

I haven't had any problems on the G12/SX30/IXUS310 and the current test versions for SX130 have it enabled as well.

Works great with the IXUS120-SD940.  Patch file on the way.

Is it worth just updating all cameras ?  This has been a major annoyance for so many people.


It uses the top leftmost pixel to detect screen erase by setting this to a known value.
There is a chance it could cause the menu to constantly erase and redraw if something else changed this value, some CHDK OSD element perhaps (although these are turned off when menus are on).

Didn't want to enable something like this globally with no way to test it on a large range of cameras.

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: fix for common menu redraw issue ? Changeset 1250
« Reply #4 on: 29 / July / 2011, 21:15:28 »
Once again, i've been fighting with my old friend,  RefreshPhysicalScreen() for my G10 port.  Here's what I posted 10 months ago :

http://chdk.setepontos.com/index.php?topic=5857.0

Code: [Select]
extern unsigned int screen_width, screen_height, screen_size;
extern void draw_filled_rect( int, int, int, int, int );

void vid_bitmap_refresh()
{
draw_filled_rect(0, 0, screen_width, screen_height, 0x00) ;
}

Seems like every port fights this one and they are all a little different. 

The hack I posted in the thread above seems to do the same thing and once I implemented your fix,  that might be all that is  needed going forward ?

 
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: fix for common menu redraw issue ? Changeset 1250
« Reply #5 on: 29 / July / 2011, 21:50:39 »
Once again, i've been fighting with my old friend,  RefreshPhysicalScreen() for my G10 port.  Here's what I posted 10 months ago :

http://chdk.setepontos.com/index.php?topic=5857.0

Code: [Select]
extern unsigned int screen_width, screen_height, screen_size;
extern void draw_filled_rect( int, int, int, int, int );

void vid_bitmap_refresh()
{
draw_filled_rect(0, 0, screen_width, screen_height, 0x00) ;
}

Seems like every port fights this one and they are all a little different. 

The hack I posted in the thread above seems to do the same thing and once I implemented your fix,  that might be all that is  needed going forward ?

 

My understanding is that vid_bitmap_refresh is there to tell the firmware to erase and redraw the screen.

Using draw_filled_rect will erase the screen; but don't you also lose the Canon OSD?

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: fix for common menu redraw issue ? Changeset 1250
« Reply #6 on: 29 / July / 2011, 23:46:25 »
My understanding is that vid_bitmap_refresh is there to tell the firmware to erase and redraw the screen. Using draw_filled_rect will erase the screen; but don't you also lose the Canon OSD?

That's what I thought too at first and its probably true.  However,  from what I can tell, CHDK only uses  vid_bitmap_refresh() while in <ALT> mode and you probably don't care about the Canon OSD at that point ?


Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: fix for common menu redraw issue ? Changeset 1250
« Reply #7 on: 29 / July / 2011, 23:57:14 »
My understanding is that vid_bitmap_refresh is there to tell the firmware to erase and redraw the screen. Using draw_filled_rect will erase the screen; but don't you also lose the Canon OSD?

That's what I thought too at first and its probably true.  However,  from what I can tell, CHDK only uses vid_bitmap_refresh() while in <ALT> mode and you probably don't care about the Canon OSD at that point ?


It's also called when a script finishes (which is still technically in Alt mode I guess).

I suspect it's like a lot of bits in CHDK - if it works use it (until something better comes along) :)

I'd suggest using draw_clear() instead of draw_filled_rect - it should be faster.

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 hwntw

  • ***
  • 162
Re: fix for common menu redraw issue ? Changeset 1250
« Reply #8 on: 30 / July / 2011, 03:56:59 »
Just add '#define CAM_DETECT_SCREEN_ERASE 1' to platform_camera.h will enable it.

I haven't had any problems on the G12/SX30/IXUS310 and the current test versions for SX130 have it enabled as well.

Works great with the IXUS120-SD940.  Patch file on the way.

Is it worth just updating all cameras ?  This has been a major annoyance for so many people.


It uses the top leftmost pixel to detect screen erase by setting this to a known value.
There is a chance it could cause the menu to constantly erase and redraw if something else changed this value, some CHDK OSD element perhaps (although these are turned off when menus are on).

Didn't want to enable something like this globally with no way to test it on a large range of cameras.

Phil.

Hello,
Tested on Ixus 95 and works well.

Colin
Ixus 95 IS Ixus 30 izoom Powershot S80 S100 S200


Windows 10

Re: fix for common menu redraw issue ? Changeset 1250
« Reply #9 on: 21 / August / 2011, 15:25:03 »
I've been using the OSD editor to try to position the CHDK icons away from the Canon icons for the G10.  In shooting mode it occurred to me that it would be nice of your redraw fix worked there too.   Any chance of that ?
Ported :   A1200    SD940   G10    Powershot N    G16

 

Related Topics


SimplePortal © 2008-2014, SimplePortal