USB Remote Switch in CHDK - version 2 implementation thread - page 18 - General Discussion and Assistance - CHDK Forum

USB Remote Switch in CHDK - version 2 implementation thread

  • 220 Replies
  • 54145 Views
*

Offline srsa_4c

  • ******
  • 4426
Re: USB Remote Switch in CHDK - version 2 implementation thread
« Reply #170 on: 13 / April / 2014, 14:41:13 »
Advertisements
Yes, but I wouldn't call it a bug, it's "just" incompatibility. Perhaps it's time (for me) to re-work the get_usb_bit() implementation in the s80 and s3is ...? They can't sync properly anyway...
The rework doesn't help, the problem is not caused by get_usb_bit(). If sync is enabled and the pulse is long enough for the cam to reach the "blanking" part in rec mode, it will crash.
BTW, the shortest pulse width that can be measured by the script found on this page is 110ms, all widths are multiples of this (220ms, 330ms, ...). (I'm still talking about the s80.)

Re: USB Remote Switch in CHDK - version 2 implementation thread
« Reply #171 on: 13 / April / 2014, 14:51:52 »
The rework doesn't help, the problem is not caused by get_usb_bit(). If sync is enabled and the pulse is long enough for the cam to reach the "blanking" part in rec mode, it will crash.
When sync is being used,  the camera starts shooting on the rising edge  (USB power on) and halts in wait_until_remote_button_is_released() (called from capt_seq.c) until the USB power turns off.   If sync is not enabled,  it follows the same path through the code but doesn't wait for the USB power to go away.  It seems the S80 may not like sitting in a tight loop in wait_until_remote_button_is_released() waiting for the USB power to go away?

Quote
BTW, the shortest pulse width that can be measured by the script found on this page is 110ms, all widths are multiples of this (220ms, 330ms, ...). (I'm still talking about the s80.)
What is the actual pulse length vs what the script reports?  Does the script report 110ms but the actual pulse is a different length?  Does it miss any pulse shorter than 110ms?
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline srsa_4c

  • ******
  • 4426
Re: USB Remote Switch in CHDK - version 2 implementation thread
« Reply #172 on: 13 / April / 2014, 15:05:35 »
When sync is being used,  the camera starts shooting on the rising edge  (USB power on) and halts in wait_until_remote_button_is_released() (called from capt_seq.c) until the USB power turns off.   (...)  It seems the S80 may not like sitting in a tight loop in wait_until_remote_button_is_released() waiting for the USB power to go away?
Probably, the task that is responsible for retrieving the USB bit may not get any CPU. I'd like to note that this camera can't finish the CHDK benchmark either, switches off.
Quote
What is the actual pulse length vs what the script reports?  Does the script report 110ms but the actual pulse is a different length?  Does it miss any pulse shorter than 110ms?
The pulses are manual (:)), so I don't know their length. Shorter pulses are not detected.

*

Offline msl

  • *****
  • 1276
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: USB Remote Switch in CHDK - version 2 implementation thread
« Reply #173 on: 23 / April / 2014, 17:50:44 »
A draft patch file that adds high precision timer capability to USB remote processing is attached ...
SX20 and S3 have been successfully tested with a CanoRemote. Here are some results (thx Werner_O): http://www.studio4all.de/foren/chdk/Results_USB_High_Speed_Mode.pdf

msl
CHDK-DE:  CHDK-DE links


Re: USB Remote Switch in CHDK - version 2 implementation thread
« Reply #174 on: 23 / April / 2014, 20:33:33 »
SX20 and S3 have been successfully tested with a CanoRemote. Here are some results (thx Werner_O): http://www.studio4all.de/foren/chdk/Results_USB_High_Speed_Mode.pdf
I took at look at these results and was surprised to notice that the values are essentially the same for the various values of "s".   But then I remembered that the code "clamps" the minimum value of "s" that can be set to 1000 so the three test conditions are actually the same.  Unless Werner_O actually changed the definition of the #define CAM_REMOTE_HIGHSPEED_LIMIT value?

Edit :  it would also be interesting to see the test results with "s" set to 10000  (i.e. standard value for CHDK when HP timer not enabled).
« Last Edit: 23 / April / 2014, 23:46:07 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline msl

  • *****
  • 1276
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: USB Remote Switch in CHDK - version 2 implementation thread
« Reply #175 on: 24 / April / 2014, 07:12:49 »
  Unless Werner_O actually changed the definition of the #define CAM_REMOTE_HIGHSPEED_LIMIT value?

Edit :  it would also be interesting to see the test results with "s" set to 10000  (i.e. standard value for CHDK when HP timer not enabled).
I have compiled the patched version with the default  value for #define CAM_REMOTE_HIGHSPEED_LIMIT. Werner_O cannot compile his own CHDK.

I will ask him for test results with 10,000 as argument. But I know, without the highspeed function the CanoRemote was not useable for the S3. There were very strange deviations.

msl
CHDK-DE:  CHDK-DE links

Re: USB Remote Switch in CHDK - version 2 implementation thread
« Reply #176 on: 24 / April / 2014, 08:28:27 »
I have compiled the patched version with the default  value for #define CAM_REMOTE_HIGHSPEED_LIMIT.
It would be very interesting to see his test results when CHDK is compiled with
#define CAM_REMOTE_HIGHSPEED_LIMIT 0
in the camera's platform_camera.h file.

Quote
Werner_O cannot compile his own CHDK.
Please thank Werner_O for me.  His report was very professional.

Quote
I will ask him for test results with 10,000 as argument. But I know, without the highspeed function the CanoRemote was not useable for the S3. There were very strange deviations.
That is why it will be interesting to see what happens.  Using the HP timer instead of normal CHDK, even at a setting of 10000 may give satisfactory performance as the pulse measurements is now done via the timer interrupt rather than a normal task.  It would also be interesting to see results at 2000 and 5000 if Werner_O can spare the time for a little additional testing.
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline msl

  • *****
  • 1276
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: USB Remote Switch in CHDK - version 2 implementation thread
« Reply #177 on: 27 / April / 2014, 05:05:00 »
Here are the new test results. The missing tests with the S3 were not useful. A big thank you for the tests goes to Werner_O from the German CHDK forum.

msl
CHDK-DE:  CHDK-DE links


Re: USB Remote Switch in CHDK - version 2 implementation thread
« Reply #178 on: 27 / April / 2014, 11:32:35 »
Here are the new test results. The missing tests with the S3 were not useful.
It may not be clear to everyone looking at the attached pdf's but these are excellent results ! 

The red color coding of the text does not actually mean bad - see below.  With  #define CAM_REMOTE_HIGHSPEED_LIMIT 0 the results are exactly what they should be.

If you look a the value of "s" and the reported timing values, they are almost exactly correlated.   At s=1000,  the values reported are in mSec.  When s=2000 the values are in mSec/2,  when s=5000 the values are in msec/5, and when s=10000 the values  are in mSec/10.   Likewise the values when s=500 are mSec*2.  And when s=250, the experiment fails because the interrupt rate was too high ( or s=500 for the older S3).

I suppose it would be possible to have the CHDK code scale the reported results prior to making them available to the script but that's extra processing that's really unnecessary if the script writer is aware of what changing the value of "s" does to the reported values.

If Werner_O was to redo his spread sheet and prescale the measured values relative to the value of "s",  I don't think there would be any red text.

Quote
A big thank you for the tests goes to Werner_O from the German CHDK forum.
I'd like to say thank you as well.  Excellent work !

I think its time to enable this feature in the 1.3.0 trunk unless anyone has an objection?
Ported :   A1200    SD940   G10    Powershot N    G16

Re: USB Remote Switch in CHDK - version 2 implementation thread
« Reply #179 on: 27 / April / 2014, 11:48:55 »
Hi,

can I ask what is the 's' value for in function 'enable_highspeed_usb(s)?
And what it has to do with the #define CAM_REMOTE_HIGHSPEED_LIMIT 0?

Thanks!

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

 

Related Topics