LCD Display on/off - Script Writing - CHDK Forum

LCD Display on/off

  • 10 Replies
  • 2918 Views
LCD Display on/off
« on: 10 / March / 2013, 13:01:27 »
Advertisements
Hi

I want to extend drivelapse.bas to turn off the LCD display to save battery and avoid distraction while the script is running (and then turn it back on when the script ends). Is this possible? I couldn't see a command in the user guide to do this.

Thanks


Paul

« Last Edit: 10 / March / 2013, 13:36:55 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline lapser

  • *****
  • 1093
Re: LCD Display on/off
« Reply #2 on: 10 / March / 2013, 14:49:19 »
turning off the backlight only saves approximately 10% of your battery power.
The problem is that the camera keeps turning it back on after every shot, which makes set_backlight(0) almost useless. I've added some code to lua that turns it off again every 10 msec, but it still flashes briefly after each shot. I think that should save as much battery power as is possible, but I haven't measured how much.

We have the address of TurnOnBackLight() for each camera don't we? How hard would it be to add a hook that disabled it after set_backlight(0)? That's above my pay grade at the moment, but it should be a simple hack, shouldn't it?

EOS-M3_120f / SX50_100b / SX260_101a / G1X_100g / D20_100b
https://www.youtube.com/user/DrLapser/videos

Re: LCD Display on/off
« Reply #3 on: 10 / March / 2013, 15:39:43 »
The problem is that the camera keeps turning it back on after every shot, which makes set_backlight(0) almost useless.
Only useless if you don't re-issue the command after every shot.

Quote
We have the address of TurnOnBackLight() for each camera don't we? How hard would it be to add a hook that disabled it after set_backlight(0)? That's above my pay grade at the moment, but it should be a simple hack, shouldn't it?
That function address is in the Canon code - CHDK never modifies Canon code.  What you would have to do is find every task(s) that call that function,  intercept them like we currently do the keyboard, shooting and movie tasks, and disable it that way.  A big job for at best a few seconds of additional backlight off time.

What we really need is a way to turn the whole display off on cameras that do not have that funtionality.  That saves 15x the power of just turning of the backlight.
 
Ported :   A1200    SD940   G10    Powershot N    G16


*

Offline reyalp

  • ******
  • 12874
Re: LCD Display on/off
« Reply #4 on: 10 / March / 2013, 16:11:57 »
Which will point out that turning off the backlight only saves approximately 10% of your battery power.
This is in the thread waterwingz linked, but probably worth pointing out explicitly: If the camera has a native display off mode, it will save a lot more power than turning the backlight off. See posts starting at:
http://chdk.setepontos.com/index.php?topic=9049.msg97241#msg97241

Support in the Canon firmware and the method of triggering varies widely between models.
Don't forget what the H stands for.

*

Offline lapser

  • *****
  • 1093
Re: LCD Display on/off
« Reply #5 on: 10 / March / 2013, 19:05:46 »
varies widely between models.
That problem seems to crop up a lot!
That function address is in the Canon code - CHDK never modifies Canon code.

What we really need is a way to turn the whole display off on cameras that do not have that funtionality.  That saves 15x the power of just turning of the backlight.
What's the difference between "Canon Code", and regular code?

The G1X and SX50 turn off the display when you close the back panel. The G1X then enables auto focus, even if you're in manual. The SX50 stays in manual focus, but it has an EVF which stays active and draws some power.
EOS-M3_120f / SX50_100b / SX260_101a / G1X_100g / D20_100b
https://www.youtube.com/user/DrLapser/videos

Re: LCD Display on/off
« Reply #6 on: 10 / March / 2013, 19:42:56 »
What's the difference between "Canon Code", and regular code?
Canon code is stored in the camera's NV memory by Canon when they make the camera (or after a genuine Canon released firmware update).  CHDK never messes with that code (at least not intentionally).

CHDK (or regular) code is the compiled CHDK software that loads into camera RAM at bootup (via the SD card lock trick) or via a fake firmware update.    It goes away every time you turn the camera off or reset it.

Ported :   A1200    SD940   G10    Powershot N    G16

Re: LCD Display on/off
« Reply #7 on: 10 / March / 2013, 19:45:42 »
The G1X and SX50 turn off the display when you close the back panel. The G1X then enables auto focus, even if you're in manual. The SX50 stays in manual focus, but it has an EVF which stays active and draws some power.
There is considerable variation between what the different Canon P&S camera do in many circumstances.    We can only hijack so much of the Canon code into RAM.  But if you want to try and track down everywhere that the display is handled in the Canon code and hijack enough tasks to get around it then go for it.  Might be kind of a big project though.
Ported :   A1200    SD940   G10    Powershot N    G16


*

Offline reyalp

  • ******
  • 12874
Re: LCD Display on/off
« Reply #8 on: 10 / March / 2013, 20:42:10 »
The G1X and SX50 turn off the display when you close the back panel. The G1X then enables auto focus, even if you're in manual.
This seems to be the case with most cameras that have an OVF. This is unfortunate, you should be able to MF to a specific distance and turn the display off... but I can see why Canon chose the other way: A users uses MF once, turns their display off to shoot through the OVF and finds out later that all their shots were out of focus.

At least some cameras with a dedicated "focus at infinity" mode preserve it even when the display is off. Again, support for this mode varies between models with little obvious reason.

For long intervals, turning the display off between shots can still be useful.
Quote
The SX50 stays in manual focus, but it has an EVF which stays active and draws some power.
Right, the power drain isn't so much the actual LCD as running the sensor hardware.
Don't forget what the H stands for.

Re: LCD Display on/off
« Reply #9 on: 11 / March / 2013, 01:28:05 »
Thanks for all the responses, and the useful links.

My camera is a sx260hs. Running get_propset returns a value of 5, which I see is not on the http://chdk.wikia.com/wiki/PropertyCase page. I can go through the settings and add that in sometime over the next few weeks.

I have a setting called Power Saving->Display Off which has values of 10s, 20s, 30s, etc. Using http://chdk.wikia.com/wiki/PropertyCaseDump doesn't show any differences on properties 0 to 400. Is there somewhere else that this information could be stored?

On another topic, I ran some tests on set_resolution and found the following:

set_resolution 0 = 4000x3000
set_resolution 1 = 2816x2112
set_resolution 2 = 1600x1200
set_resolution 3 = XXX
set_resolution 4 = 640x480
set_resolution 5 = XXX
set_resolution 6 = XXX
set_resolution 7 = 1984x1488

Where 'XXX' appears to crash the camera.

 

Related Topics