A2500 porting thread - page 15 - DryOS Development - CHDK Forum

A2500 porting thread

  • 154 Replies
  • 32902 Views
disable flash?
« Reply #140 on: 26 / June / 2014, 16:13:03 »
Advertisements
Hi,

can somebody tell me how to disable the flash under chdk?
I'm trying to use the interval feature.
whilst I previously only succeedded in taking one picture (after which the script didn't do anything else), this script http://chdk.wikia.com/wiki/UBASIC/Scripts:_Ultra_Intervalometer seems to run until the flash goes off.
Then a "busy" message is shown a few moment, followed by the flickering script name below, but without further action.
So I suspect the flash has some detrimental (blinding :) ) effect on the script, however I cannot find how to disable it.

Re: disable flash?
« Reply #141 on: 26 / June / 2014, 17:26:16 »
can somebody tell me how to disable the flash under chdk?
Yes. 

But I have to wonder why you don't simply disable it the normal way using the Canon keys?  (the flash symbol on the right hand side of the function dial on the back of your A2500)

Otherwise, it's possible to disable in your script by adding :

Code: [Select]
props=require("propcase")
...
set_prop(props.FLASH_MODE, 2)

Quote
I'm trying to use the interval feature.
whilst I previously only succeedded in taking one picture (after which the script didn't do anything else),
Which script?  And while we are discussing that,  what camera model (A2500?) and CHDK version are you using?

Quote
this script http://chdk.wikia.com/wiki/UBASIC/Scripts:_Ultra_Intervalometer seems to run until the flash goes off.
So you mean it takes several pictures prior to trying to use the flash ?

Quote
Then a "busy" message is shown a few moment, followed by the flickering script name below, but without further action.
Sounds a bit like your battery needs charging ?

Quote
So I suspect the flash has some detrimental (blinding :) ) effect on the script,
I seriously doubt it.
« Last Edit: 26 / June / 2014, 17:28:20 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline reyalp

  • ******
  • 12214
Re: disable flash?
« Reply #142 on: 27 / June / 2014, 01:52:17 »
Quote
So I suspect the flash has some detrimental (blinding :) ) effect on the script,
I seriously doubt it.
IIRC there are some issues related to get_shooting() and flash on some cameras, so it may not be as crazy as it sounds... I think this was discussed some in the chdkptp thread when we were developing remote capture.
Don't forget what the H stands for.

Re: disable flash?
« Reply #143 on: 27 / June / 2014, 16:22:26 »
But I have to wonder why you don't simply disable it the normal way using the Canon keys?  (the flash symbol on the right hand side of the function dial on the back of your A2500)
with chdk running, that key is assigned "show OSD"

Otherwise, it's possible to disable in your script by adding :
Code: [Select]
props=require("propcase")
...
set_prop(props.FLASH_MODE, 2)
I'll try this in a moment

I got this firmware from nafraf  a while back, after some tests nafraf requested and not getting the interval, I put it aside for a moment
CHDK ver 1.3.0 rev 3394  -mar 23 2014
camera a2500 FW 100a

...
Which script?  And while we are discussing that,  what camera model (A2500?) and CHDK version are you using?
link to script is mentioned above ultra-intervalometer and here just next.

Quote
this script http://chdk.wikia.com/wiki/UBASIC/Scripts:_Ultra_Intervalometer seems to run until the flash goes off.
So you mean it takes several pictures prior to trying to use the flash ?
it seems that way. my earlier attempts always set off the flash at the first image. this script (sometimes) took 2 or 3 pictures before the flash went off.

...
Sounds a bit like your battery needs charging ?
the battery was/is fully charged
Quote
So I suspect the flash has some detrimental (blinding :) ) effect on the script,
I seriously doubt it.
strange things have been known to occur


Re: A2500 porting thread
« Reply #144 on: 27 / June / 2014, 16:33:52 »


But I have to wonder why you don't simply disable it the normal way using the Canon keys?  (the flash symbol on the right hand side of the function dial on the back of your A2500)
with chdk running, that key is assigned "show OSD"
Disable the flash prior to entering CHDK <ALT> mode to run your script?
Ported :   A1200    SD940   G10    Powershot N    G16

Re: A2500 porting thread
« Reply #145 on: 27 / June / 2014, 17:05:33 »
I forgot one can go in and out of chdk. sorry my mistake.
with the flash off, the script sometimes goes on stating it takes pictures (pic x of y). but inreality no pictures but the first one are taken.
with the other interval scripts, it is a same behaviour :(

Re: A2500 porting thread
« Reply #146 on: 19 / August / 2014, 06:34:58 »
I found a bug on the A2500 related to setting the zoom from script and the jpeg distortion correction.

Without using CHDK, if I zoom manually and take a picture, the lens distortion is appropriately corrected in the .jpeg file. See picture below:



However, if I set the zoom by script ( set_zoom(x) ) and then take a .jpeg by script, the distortion is not corrected correctly. It is like if the camera used the lens distortion correction corresponding to a zoom of 0 instead of the current zoom. See picture below:



This is a minimal example that replicate my problem:
Quote
set_zoom(20)
sleep(2000)
press("shoot_half")
repeat sleep(50) until get_shooting() == true

press("shoot_full")
sleep(500)
release("shoot_full")

repeat sleep(50) until get_shooting() == false   
release("shoot_half")

Could there be some value that is not correctly updated by the set_zoom function that would let the raw to jpg converter of the camera believe that the camera is currently not zoomed?

Re: A2500 porting thread
« Reply #147 on: 20 / August / 2014, 08:32:12 »
I found a bug on the A2500 related to setting the zoom from script and the jpeg distortion correction.
Thank you for reporting this.  I suspect it's  something that may affect  many other CHDK equipped cameras but has not been noticed yet.

Unfortunately, this might be difficult to fix.  The zoom and focus code controlling the lens mechanisms seems to vary a lot between camera models.   Most likely somebody will need to do some serious debugging and reverse assembly - perhaps on a per camera basis - and that take time.  A lot of time.  So unless I've missed an obvious solution here, fixing this might not happen any time soon.   
Ported :   A1200    SD940   G10    Powershot N    G16


*

Offline msl

  • *****
  • 1263
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: A2500 porting thread
« Reply #148 on: 20 / August / 2014, 09:24:52 »
Maybe helps
Code: [Select]
#define CAM_USE_ALT_PT_MoveOpticalZoomAt 1in camera_platform.h

Check also
Code: [Select]
#define CAM_USE_ALT_SET_ZOOM_POINT       1
msl
CHDK-DE:  CHDK-DE links

*

Offline srsa_4c

  • ******
  • 4057
Re: A2500 porting thread
« Reply #149 on: 20 / August / 2014, 15:40:05 »
The zoom and focus code controlling the lens mechanisms seems to vary a lot between camera models.
Several newer low-end models seem to use a common 5x zoom lens (specs are the same, the exterior looks the same). My guess is that the lens related code is likely similar.
In this case, I would try looking at the a1400 code (same generation camera, same lens, no IS). Its platform_camera.h already includes the defines suggested by msl, and even more.

 

Related Topics