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

Running CHDK with battery door open

  • 72 Replies
  • 31718 Views
*

Offline srsa_4c

  • ******
  • 4451
Re: Running CHDK with battery door open
« Reply #40 on: 25 / January / 2014, 16:43:22 »
Advertisements
Battery Door Switch Hack (BDSH): Some cameras have a battery door switch sensor which prevents camera operation if battery door is open.
Yes  Hack present, sensor read is ignored, and camera operates normally when door is open.
No   Hack not implemented, camera does not operate if battery door is open.
N.R. Not Required, camera does not have battery door switch sensor., it operates normally when door is open.
Sounds good to me, less complicated. Perhaps it will have to be noted if the hack becomes a non-default build time option.
The behavior with external power is odd. If you open the door, it shuts down. If you open the door and press the power button, the screen stays black... but the camera boots when you close the door, even if though the power button is not being pressed  :-[
Same on the a410, but not on later a4xx cams.

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: Running CHDK with battery door open
« Reply #41 on: 25 / January / 2014, 17:01:50 »
Works on my G1X (r49), I can open the door with the camera running.

It requires the startup delay to boot with the door open.
Thanks for confirming, can I commit that patch, or do the #defines need a different name?

Looks ok to me, I think the names are fine.

Quote
Quote
Is this something that should be compiled in by default or enabled with a build option only for people who really need it?
IMHO it doesn't need to be in the autobuilds. If somebody needs it, it can be enabled in their build.

Should probably add a new OPT_xxx setting for buildconf.inc, and makefile changes that people can use to conditionally enable 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)

*

Offline msl

  • *****
  • 1280
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: Running CHDK with battery door open
« Reply #42 on: 26 / January / 2014, 05:51:32 »
The 'door open hack' works also on the SX220. Needs the delay in boot.c.

msl
CHDK-DE:  CHDK-DE links

Re: Running CHDK with battery door open
« Reply #43 on: 26 / January / 2014, 18:02:58 »
Could someone help me, just want to know what amount and which work is coming up for me with this issue...
I'll send you a patch file that will let you identify the bit controlled by the battery door switch.  Once we have that,  the rest is easy
Based on your PM :
Quote
So here it is: The first of the three hex values is 0x00008f00 when the door is closed and then 0x00000f00 when opened.
here's the patch file and a 1.3.0 build for the battery door switch ignore function.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: Running CHDK with battery door open
« Reply #44 on: 26 / January / 2014, 19:26:45 »
Okay, that's it! Got it working here too on the SX200IS. Thanks a lot again!

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: Running CHDK with battery door open
« Reply #45 on: 31 / January / 2014, 20:09:11 »
Works on my G1X (r49), I can open the door with the camera running.

It requires the startup delay to boot with the door open.
Thanks for confirming, can I commit that patch, or do the #defines need a different name?

Looks ok to me, I think the names are fine.

Quote
Quote
Is this something that should be compiled in by default or enabled with a build option only for people who really need it?
IMHO it doesn't need to be in the autobuilds. If somebody needs it, it can be enabled in their build.

Should probably add a new OPT_xxx setting for buildconf.inc, and makefile changes that people can use to conditionally enable the code.

Phil.

In revision 3344 (1.3 only) I have added a new build option - OPT_RUN_WITH_BATT_COVER_OPEN
This is implemented for the G12, G1X and SX40.

The idea is that cameras that have the code for running with the battery door open can use this to only include the code when the build option is selected, rather than have it in the autobuild version for all users.

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 #46 on: 31 / January / 2014, 23:36:06 »
The idea is that cameras that have the code for running with the battery door open can use this to only include the code when the build option is selected, rather than have it in the autobuild version for all users.
I realize that I'm beating a dead horse here,  but I still think this is a useful option for people working on scripts who don't/can't use chdkptp.   I don't think it's fair to assume they can create their own builds.
« Last Edit: 31 / January / 2014, 23:45:57 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

Re: Running CHDK with battery door open
« Reply #47 on: 01 / February / 2014, 03:12:45 »
Yes, that's true for me. That option would have been of immense help if I could have found it in the miscellaneous section of CHDK. I didn't even know that it is possible to do that with software.

*

Offline msl

  • *****
  • 1280
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: Running CHDK with battery door open
« Reply #48 on: 01 / February / 2014, 04:05:46 »
Hmm...

I think both sides are right. But what is more important - good test conditions or safety?

A new menu option (turn on/off 'door open hack') could be a solution. A definition in 'platform_camera.h' indicates whether the function is available.

Attached is a patch (without build options) with the 'door open hack' for the SX220. I think, the patch
needs some improvement in the boot.c part. I'm not a programmer.   :(

msl
CHDK-DE:  CHDK-DE links

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: Running CHDK with battery door open
« Reply #49 on: 01 / February / 2014, 07:50:00 »
A new menu option (turn on/off 'door open hack') could be a solution. A definition in 'platform_camera.h' indicates whether the function is available.

Catch 22 - the delay code and kbd.c code to allow the camera to start with the door open is needed long before CHDK has loaded the config file to tell it whether to allow the camera to start with the door open.

The CHDK code would then need to check if the door was open and shutdown if the flag was not set.

You would also be forcing everyone to have an extra startup delay, not just the few people who might need it.

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)

 

Related Topics


SimplePortal © 2008-2014, SimplePortal