Synch settings get lost (SDM 1.81) - page 2 - General Discussion and Assistance - CHDK Forum supplierdeeply

Synch settings get lost (SDM 1.81)

  • 31 Replies
  • 5482 Views
Re: Synch settings get lost (SDM 1.81)
« Reply #10 on: 02 / November / 2009, 16:25:05 »
Advertisements
I do not understand what you are saying.

Enable synch delay is meant to be disabled on the left camera.

What is the problem ?


Re: Synch settings get lost (SDM 1.81)
« Reply #11 on: 02 / November / 2009, 16:29:55 »
Normally the SDM bar shows Synch:0.0000 for left camera and Synch:0040 for right camera.
Only with this, I get synchronized images even if I use flash.

My problem is 'Enable synch delay' gets disabled (only on left cam) if I half-press ths shutter.
Then SDM bar shows Synch: _____ (underscore means spaces) for left camera and Synch:0040 for right camera.
And then synchronisation fails, I see flash only effecting image of right cam, image on left cam is dark.

Hope this makes it more clear.
2 x IXUS 860IS 100c
2 x Powershot S110 103a

Re: Synch settings get lost (SDM 1.81)
« Reply #12 on: 02 / November / 2009, 16:40:05 »
In \platform\generic\shooting.c search for function 'presynch()'.

That will be executed when you half-press.

It starts with the condition  if(conf.synch_enable)

Hmmm ...

You will have to study that bit of code while I continue with other work.

When you get stuck, report back  :)

Re: Synch settings get lost (SDM 1.81)
« Reply #13 on: 02 / November / 2009, 16:47:34 »
Hi Mircofunguy,

Thanks so far,

OK if I find some more time I will look at it, I will go to bed now, I am tired :-)

I downloaded the original SDM 1.81 again and uploaded to my SD card.
And same behaviour (only left cam), if I half-press shutter button then 'Enable synch delay' gets disabled immediately and 0.0000 disappeers from SDM bar on display.

I wonder that nobody else than me complained about it?


2 x IXUS 860IS 100c
2 x Powershot S110 103a


Re: Synch settings get lost (SDM 1.81)
« Reply #14 on: 02 / November / 2009, 16:57:38 »
I wonder that nobody else than me complained about it?


Because you use a remote switch, you do not press the button !


Re: Synch settings get lost (SDM 1.81)
« Reply #15 on: 02 / November / 2009, 17:25:52 »
I found out more, even if I use USB switch, the 'Enable synch delay' gets disabled on 1st pressing USB button, so disabled 'Eanble synch delay' cannot not be the cause of my synch problem!

I found out if I use USB switch almost 95% of photos are synchronized using flash.
If I use shutter button then only few images are synhronized. The only difference is the function
wait_until_remote_button_is_released.

So may my wait_until_remote_button_is_released function is incorrect?
Or may because my function has only few lines compared to original function, my function gets executed faster and
causes this mis-synchronisation?
Or may the cameras original shutter button behaviour disturbs the SDM during shooting so the wait_until_remote_button_is_released is not executed same time on both cameras?

Here my function:
void wait_until_remote_button_is_released(void)
{
asm volatile ("STMFD SP!, {R0-R11,LR}\n"); // store R0-R11 and LR in stack

#define DELAY_TIMEOUT 10000
int tick;
long z;

debug_led(1);

_kbd_pwr_on();
tick=get_tick_count();

do
{
  kbd_fetch_data(kbd_new_state);
  
  z = kbd_new_state[2] & 0x3;
}
while( (!z) && ((int)get_tick_count()-tick < DELAY_TIMEOUT));

_kbd_pwr_off();

debug_led(0);

asm volatile ("LDMFD SP!, {R0-R11,LR}\n");
}

Thanks for further ideas!
« Last Edit: 02 / November / 2009, 17:32:10 by mr.burns »
2 x IXUS 860IS 100c
2 x Powershot S110 103a

Re: Synch settings get lost (SDM 1.81)
« Reply #16 on: 02 / November / 2009, 17:37:03 »
It is late.

I will study it tomorrow.

Re: Synch settings get lost (SDM 1.81)
« Reply #17 on: 03 / November / 2009, 05:47:04 »
On the right camera, after the switch is released there needs to be a delay before continuing with the image-capture task.
This is so that the right camera fires the flash halfway through the exposure.
That way, both cameras will see the flash (if the shutter speed is not too high).

So, you check if it is the camera on the right (conf.synch_delay_enable will be true) and if so execute delay .

Code: [Select]
if (conf.synch_delay_enable && ((conf.synch_delay_value+(conf.synch_delay_coarse_value*1000))>0)) //if delay is switched on and greater than 0
  {
    for (count1=0;count1<conf.synch_delay_value+(conf.synch_delay_coarse_value*1000);count1++) //wait delay_value * 0.1ms
    {
      for (count2=0;count2<1400;count2++)            //delay approx. 0.1ms
        {
        }
     }
  }

That was based on VxWorks cameras, I do not know if '1400' is correct number for DRYOS cameras.
If the shutter-speed is not too high, it will not have made any obvious difference to synch.

But maybe it can be 'tweaked' so that higher shutter speeds are possible.


Re: Synch settings get lost (SDM 1.81)
« Reply #18 on: 03 / November / 2009, 11:43:22 »
Hi Microfunguy,

sorry but I do not know what you want to tell me?!?
The code you posted is already in SDM or you want me to add somewhere?

As I explained, I found out, that using the USB switch, almost 95 % of images using flash are ok.
So your delay function using 1400 (if it is already in SDM) should be OK, because using USB switch I don't have problems at all!
But If I use internal shutter (and my wait_until_remote_button_is_released function) than only few images are synchronized correctly.
So I wonder where is the difference releasing the shutter button and releaseing the USB switch?

I don't understand SDM in depth, but can it be that the normal behaviour of shutter button causes the problem?
I don't know if it is clear to you what I mean. Pressing the shutter button without SDM causes the camera to take a photo. This is what I call 'normal behaviour' of shutter button.
Using the SDM I don't know if this 'normal behaviour' completey gets replaced by SDM or it is additional to SDM?
If I use the USB switch then SDM waits just for releasing USB switch. Because shutter button is not touched and so no 'normal behaviour' the cam needs to execute.
But if I use shutter button then maybe the 'normal behaviour' takes place and afterwards the SDM routine is executed? So may this can cause the delay?

Thanks for further discussion!
« Last Edit: 03 / November / 2009, 11:48:50 by mr.burns »
2 x IXUS 860IS 100c
2 x Powershot S110 103a

Re: Synch settings get lost (SDM 1.81)
« Reply #19 on: 03 / November / 2009, 12:09:58 »
I am assuming that in your keyboard code above you are monitoring the internal shutter switch for release.

 z = kbd_new_state[2] & 0x3;

Is that correct ?

EDIT:
I guess the KEY_SHOOT_FULL mask is really 0x2 or'ed with KEY_SHOOT_HALF 0x1 to give 0x3.

After detecting release you need to add the delay code I have given above after  _kbd_pwr_off();.

Remember, if conf.synch_enable is false, which it normally is if you  have directly pressed the shutter button, all the above keyboard code will be ignored.

You have changed the code so that conf.synch_enable is true so the above code will be executed.
« Last Edit: 03 / November / 2009, 12:21:41 by Microfunguy »

 

Related Topics