I tried using the sync option with GetAdChValue, but unfortunately as soon as the trigger is activated, the camera seems to freeze up, wait about 10 seconds (same each time), and then take a photo photo regardless of what I do with the trigger.
Can you tell me more about how you to implement this? Modified source code or CHDK script? The 10 sec timeout usually means the USB remote code is waiting at _wait_until_remote_button_is_released() for the USB signal to go to 0V. If it waits too long, then it times out.
Well it's working now, the problem was I had
do { } while( (GetAdChValue(5)) ... instead of
do { } while( (GetAdChValue(5) < 555) ... a careless mistake that only manifested itself when using the sync option.
Did some sync tests on the D20, and I'm having some problems unfortunately. Without sync, everything functions as expected, and there's about at least 20ms of uncertainty in the delay times. However, when using sync, there's also at least 20ms of uncertainty aswell. The delay time is shortened considerably, and the screen goes dark, so I'm pretty sure the sync is properly enabled, but it's not working properly for some reason. Also tested with the IXUS 65 straight after and it appeared properly synced, so I don't think it's a problem with the test rig.
Here is the code I put in the usb_remote.c file:
if ( conf.remote_input == 0 )
{
remote_key = get_usb_bit() ;
}
if ( conf.remote_input == 1 )
{
if (*(short*)0xc090004a < 555)
{
remote_key = 1 ;
}
else
{
remote_key = 0 ;
}
}
if ( conf.remote_input == 2 )
{
if (GetAdChValue(5) < 555)
{
remote_key = 1 ;
}
else
{
remote_key = 0 ;
}
}
and
if ( conf.remote_input == 0 )
{
do { } while( get_usb_bit() && ((int)get_tick_count()-tick < DELAY_TIMEOUT));
}
if ( conf.remote_input == 1 )
{
do { } while( (*(short*)0xc090004a < 555) && ((int)get_tick_count()-tick < DELAY_TIMEOUT));
}
if ( conf.remote_input == 2 )
{
do { } while( (GetAdChValue(5) < 555) && ((int)get_tick_count()-tick < DELAY_TIMEOUT));
}
I have also turned off pretty much every option that can be disabled in the Canon menu, and it's set to manual focus. Interestingly, the delay time seems to vary predictably each time. It starts off at about 50ms, then works it's way down to about 25ms in about 6 to 10 steps, before jumping back to around 50ms and repeating the cycle.
Any idea of why all this may be happening?