A better(?) way to control display off - page 6 - General Discussion and Assistance - CHDK Forum supplierdeeply

A better(?) way to control display off

  • 81 Replies
  • 23292 Views
*

Offline lapser

  • *****
  • 1093
Re: A better(?) way to control display off
« Reply #50 on: 22 / October / 2013, 12:05:40 »
Advertisements
Attached patch adds:
- C wrapper functions TurnOnDisplay & TurnOffDisplay (wrappers for DispCon_TurnOnDisplay_FW & DispCon_TurnOffDisplay_FW)
Thanks Phil! That's perfect.

I have to leave for a week of travel now, but I'll try it out and add it to my scripts as soon as I get back.

And thank you reyalp for discovering this method.
EOS-M3_120f / SX50_100b / SX260_101a / G1X_100g / D20_100b
https://www.youtube.com/user/DrLapser/videos

Re: A better(?) way to control display off
« Reply #51 on: 22 / October / 2013, 23:04:59 »
Attached patch adds:
- C wrapper functions TurnOnDisplay & TurnOffDisplay (wrappers for DispCon_TurnOnDisplay_FW & DispCon_TurnOffDisplay_FW)
- Lua and uBasic function set_LCDdisplay, works the same as set_backlight; but calls new display control functions.
Thanks Phil.   Tested okay on :

1) G10  :                    propset 2 DryOS camera
2) IXUS120_SD940 :  propset 3 DryOS camera
3) A1200 :                  propset 4 DryOS camera
4) SX50HS :               propset 5 DryOS camera

Nice to see this post and the pause for people to test and comment.  I've been criticized here lately for not accepting that a script version of this concept was "well tested" based on the author testing his own code with the same script over & over on four post-2011 cameras.  As you collect real data on this,  I hope it makes it into the svn.
 
edit : found my sx50 and tested it too
« Last Edit: 22 / October / 2013, 23:13:49 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

*

Online philmoz

  • *****
  • 3225
    • Photos
Re: A better(?) way to control display off
« Reply #52 on: 23 / October / 2013, 22:58:35 »
Attached patch adds:
- C wrapper functions TurnOnDisplay & TurnOffDisplay (wrappers for DispCon_TurnOnDisplay_FW & DispCon_TurnOffDisplay_FW)
- Lua and uBasic function set_LCDdisplay, works the same as set_backlight; but calls new display control functions.
Thanks Phil.   Tested okay on :

1) G10  :                    propset 2 DryOS camera
2) IXUS120_SD940 :  propset 3 DryOS camera
3) A1200 :                  propset 4 DryOS camera
4) SX50HS :               propset 5 DryOS camera

Nice to see this post and the pause for people to test and comment.  I've been criticized here lately for not accepting that a script version of this concept was "well tested" based on the author testing his own code with the same script over & over on four post-2011 cameras.  As you collect real data on this,  I hope it makes it into the svn.
 
edit : found my sx50 and tested it too

It works on my cameras, so with your testing that's probably about as much coverage as it is likely to get.

I'll add it to SVN tonight or tomorrow, unless anyone has any issues.

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 reyalp

  • ******
  • 12887
Re: A better(?) way to control display off
« Reply #53 on: 23 / October / 2013, 23:41:54 »
I'll add it to SVN tonight or tomorrow, unless anyone has any issues.
No objection.

For consistency I'd prefer to stick to the lower case + underscores naming used by most of the rest of the script api, but that's just my $0.02.

Implementing for DryOS only right now is fine, but it would be desirable to support on vxworks as well.
Don't forget what the H stands for.


*

Online philmoz

  • *****
  • 3225
    • Photos
Re: A better(?) way to control display off
« Reply #54 on: 23 / October / 2013, 23:51:55 »
I'll add it to SVN tonight or tomorrow, unless anyone has any issues.
No objection.

For consistency I'd prefer to stick to the lower case + underscores naming used by most of the rest of the script api, but that's just my $0.02.

Probably better to maintain the pattern - I'll add it as 'set_lcd_display'.

Quote
Implementing for DryOS only right now is fine, but it would be desirable to support on vxworks as well.

Does not appear to be equivalent event procs on VxWorks, if the functions are there I'm not sure how easy they will be to find.
I figured making it fall back to the backlight on/off was a reasonable compromise.

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 reyalp

  • ******
  • 12887
Re: A better(?) way to control display off
« Reply #55 on: 23 / October / 2013, 23:56:19 »
Does not appear to be equivalent event procs on VxWorks, if the functions are there I'm not sure how easy they will be to find.
I figured making it fall back to the backlight on/off was a reasonable compromise.

Phil.
I did a good bit of my original testing on a540...  :-[

edit:
Again, checking in dryos only is fine for now, I can probably add the vxworks stuff later. The eventprocs should be findable just by looking for pointer to name, pointer to function pairs, which tools/find_eventproc.c can do.
« Last Edit: 24 / October / 2013, 00:06:20 by reyalp »
Don't forget what the H stands for.

*

Online philmoz

  • *****
  • 3225
    • Photos
Re: A better(?) way to control display off
« Reply #56 on: 24 / October / 2013, 00:09:07 »
Does not appear to be equivalent event procs on VxWorks, if the functions are there I'm not sure how easy they will be to find.
I figured making it fall back to the backlight on/off was a reasonable compromise.

Phil.
I did a good bit of my original testing on a540...  :-[

edit:
Again, checking in dryos only is fine for now, I can probably add the vxworks stuff later. The eventprocs should be findable just by looking for pointer to name, pointer to function pairs, which tools/find_eventproc.c can do.

Hmm, if the event procs are there with the same name I wonder why the new finsig_vxworks is not finding them?
Will need to take a closer look - if you know the function addresses on a VxWorks camera that would help.

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 reyalp

  • ******
  • 12887
Re: A better(?) way to control display off
« Reply #57 on: 24 / October / 2013, 02:29:11 »
Hmm, if the event procs are there with the same name I wonder why the new finsig_vxworks is not finding them?
Will need to take a closer look - if you know the function addresses on a VxWorks camera that would help.
A540
DispCon_TurnOnDisplay
FFD218FC
DispCon_TurnOffDisplay
FFD2190C

The eventproc table containing these is at FFEF8288, which is copied to the firmware data segment in RAM as 0x5D98 and registered by sub_FFD21924 from DispDev_EnableEventProc.

On vxworks, many of the event proc tables are registered like that.

edit:
In http://chdk.wikia.com/wiki/User:ReyalP/EventProcNotes#Driver_EnableEventProc I noted many of the ones that come from ram.
Don't forget what the H stands for.


*

Online philmoz

  • *****
  • 3225
    • Photos
Re: A better(?) way to control display off
« Reply #58 on: 24 / October / 2013, 03:47:28 »
Hmm, if the event procs are there with the same name I wonder why the new finsig_vxworks is not finding them?
Will need to take a closer look - if you know the function addresses on a VxWorks camera that would help.
A540
DispCon_TurnOnDisplay
FFD218FC
DispCon_TurnOffDisplay
FFD2190C

The eventproc table containing these is at FFEF8288, which is copied to the firmware data segment in RAM as 0x5D98 and registered by sub_FFD21924 from DispDev_EnableEventProc.

On vxworks, many of the event proc tables are registered like that.

edit:
In http://chdk.wikia.com/wiki/User:ReyalP/EventProcNotes#Driver_EnableEventProc I noted many of the ones that come from ram.

Can you upload a full dump from the a540 please.
I only have a short one.

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)

*

Online philmoz

  • *****
  • 3225
    • Photos
Re: A better(?) way to control display off
« Reply #59 on: 24 / October / 2013, 08:39:40 »
Hmm, if the event procs are there with the same name I wonder why the new finsig_vxworks is not finding them?
Will need to take a closer look - if you know the function addresses on a VxWorks camera that would help.
A540
DispCon_TurnOnDisplay
FFD218FC
DispCon_TurnOffDisplay
FFD2190C

The eventproc table containing these is at FFEF8288, which is copied to the firmware data segment in RAM as 0x5D98 and registered by sub_FFD21924 from DispDev_EnableEventProc.

On vxworks, many of the event proc tables are registered like that.

edit:
In http://chdk.wikia.com/wiki/User:ReyalP/EventProcNotes#Driver_EnableEventProc I noted many of the ones that come from ram.

Updated patch:
- renamed function to 'set_lcd_display' in uBasic and Lua
- updated finsig_vxworks and finsig_dryos to find firmware functions on all cameras.

It would be good to get some testing on VxWorks cameras before committing this to SVN.

Phil.

Note: the updated finsig_works finds a lot more of the event procs, which also changes some of the existing values - most noticeably GetCurrentAvValue. I checked on a couple of cameras where this value has changed and the new value looks correct.

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)

 

Related Topics