Running CHDK with battery door open - page 6 - General Discussion and Assistance - CHDK Forum

Running CHDK with battery door open

  • 72 Replies
  • 34503 Views
*

Offline msl

  • *****
  • 1280
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: Running CHDK with battery door open
« Reply #50 on: 01 / February / 2014, 08:00:18 »
Advertisements
Oh yes, I forgot the point with the timing issue. Thanks for the note.

Then is the compiler option the best way.

msl
CHDK-DE:  CHDK-DE links

*

Offline ahull

  • *****
  • 634
Re: Running CHDK with battery door open
« Reply #51 on: 01 / February / 2014, 08:22:51 »
An alternative idea would be to have an "Enable Startup with door open" option in the menu toggle a couple of byes in the startup code file on the SD card from "noop noop noop" to "branch startup delay" and back, depending on whether you want the feature on or off. but that might take a bit of head scratching to figure out.

*

Offline srsa_4c

  • ******
  • 4451
Re: Running CHDK with battery door open
« Reply #52 on: 01 / February / 2014, 08:41:30 »
An alternative idea would be to have an "Enable Startup with door open" option in the menu toggle a couple of byes in the startup code file on the SD card from "noop noop noop" to "branch startup delay" and back, depending on whether you want the feature on or off. but that might take a bit of head scratching to figure out.
If you mean changing diskboot.bin, that would be complicated by the fact that all recent cameras require scrambled diskboots - changing a few bytes would mean: unscramble the diskboot file -> change the bytes -> scramble the file and copy it back as diskboot.bin.

Another idea:
If there are bytes in known sectors (like the boot sector) of the card which don't have an important meaning, they could be used to store a few bits of configuration data (for features like this) which could be checked after the card is initialized - this doesn't need a filesystem.

Re: Running CHDK with battery door open
« Reply #53 on: 01 / February / 2014, 09:29:29 »
tl;dr : the hack currently adds about one second to the startup time

You would also be forcing everyone to have an extra startup delay, not just the few people who might need it.
Just to be clear,  we are not talking about a 15 second additional delay or anything like that.

I did some very simple testing on my G10, which has had the "battery door open" hack since its alpha test days.

Using the sweep second hand of my watch, I carefully timed the interval between when I press the "Playback" button and the instant that the CHDK logo disappears,  using CHDK builds with and without the boot.c timing hack. Accuracy is at best about 1/2 second and I repeated the test five times for each configuration.

With the boot.c hack inserted, the camera always starts in four seconds.  Without that delay, the camera starts in three seconds.  So the hack adds one whole second to the startup time.

Also, as mentioned in the original thread, no attempt was made to optimize (shorten) the delay time.  One second seemed to work fine but we could experiment with 3/4 second or 1/2 second.  Hardly seems worth the effort although I have read camera reviews that leave you convinced one camera is better than another because of a one second difference in startup time.  You never know when that extra delay means you will miss the shot of a lifetime.   ;)

Update 1: I cut the delay time in half and the hack still works after multiple startups.  So I cut it in half again, and it also worked.  At this point,  the timing difference between having the hack and not having it is less than 1/4 second.  I'd challenge anyone to actually notice that in real life.

Update 2: A little more experimenting indicate things still work with a 1/8 second delay but not with a 1/16 second delay.  This may of course vary from camera to camera so a 1/2 second default delay might be wise.
« Last Edit: 01 / February / 2014, 10:04:57 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

Re: Running CHDK with battery door open
« Reply #54 on: 01 / February / 2014, 18:09:52 »
As an advanced user I would have really loved to have half a second added when being able to switch on the hack in the config menu.

Now I got the hack compiled in my version, but I use CHDK now for 4 years and built my first own version two months ago. I think this is the case for a lot of users who would never know of such possibility if it isn't visible on the menu.

Just my two cents.

Re: Running CHDK with battery door open
« Reply #55 on: 01 / February / 2014, 18:16:51 »
As an advanced user I would have really loved to have half a second added when being able to switch on the hack in the config menu.
Unfortunately,  as several people have posted, its not something that can easily get added to the CHDK menus.  It needs to be either enabled all the time, or added as a "compile time build option".  If the only objection to building it in all the time is the start-up delay,  I really don't buy that argument.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: Running CHDK with battery door open
« Reply #56 on: 01 / February / 2014, 18:23:04 »
Aaaah okay, did not get that. Well at least it should somehow become automatically known to everyone who starts scripting.

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: Running CHDK with battery door open
« Reply #57 on: 01 / February / 2014, 18:29:17 »
If the only objection to building it in all the time is the start-up delay,  I really don't buy that argument.

My main objection is the safety issue of not having the camera shut down when the door is opened, and the risk of corrupting the SD card.

The startup delay is a secondary issue; but should still be considered.

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: Running CHDK with battery door open
« Reply #58 on: 01 / February / 2014, 18:40:38 »
My main objection is the safety issue of not having the camera shut down when the door is opened, and the risk of corrupting the SD card.
Good point - the reason for letting the battery door remain open is rapid SD card swaps while scripting.  And that's the exact situation where someone will pop the card prior to shutting down the camera.

Still,  at some point this starts to feel like the old Windows95 popup box that warned "Don't run with scissors".

I guess the firewall is that if you can recompile your own code,  you are savy enough to understand the risks of removing an SD card while the camera is running?
Ported :   A1200    SD940   G10    Powershot N    G16

Re: Running CHDK with battery door open
« Reply #59 on: 01 / February / 2014, 18:51:08 »
Also I think that a warning message pointing this out should be enough for someone using CHDK. But the delay is something that's worth discussing. A fast startup might be important for some. Hard to decide I think.

 

Related Topics


SimplePortal © 2008-2014, SimplePortal