cancel retract timer - Script Writing - CHDK Forum  

cancel retract timer

  • 6 Replies
  • 258 Views
cancel retract timer
« on: 20 / March / 2019, 07:08:44 »
Advertisements
https://chdk.setepontos.com/index.php?topic=9969.msg139226#msg139226

FWIW, I found something better. A function that cancels the retract timer.
Second function call after the "AC:SStoreLensT" or "AC:SStoreLens" log string.

Should I found the functions here?
chdk/trunk/platform/sx50hs/sub/100c/funcs_by_xxx
Not yet.
Quote
What exactly I have to call on my SX50 (100c) in lua?
call_func_ptr(0xFF049EB4)
You can make a test script that only has that single line and execute it in playback mode (obviously, the lens has to be extended when you run the script).

The cancel of retract timer works very well. I would like to try this with my other cameras (G1x 101a, G1x 100e, S110 103a, SX230 101a) as well. I'm still not clear how I get the address…

M100 100a, M3 101a, 2*G1x (101a,100e), S110 (103a), SX50 (100c), SX230 (101a), 2*S45,
Flickr https://www.flickr.com/photos/136329431@N06/albums
YouTube https://www.youtube.com/channel/UCrTH0tHy9OYTVDzWIvXEMlw/videos?shelf_id=0&view=0&sort=dd

*

Offline srsa_4c

  • ******
  • 3877
Re: cancel retract timer
« Reply #1 on: 20 / March / 2019, 14:09:39 »
I would like to try this with my other cameras (G1x 101a, G1x 100e, S110 103a, SX230 101a) as well. I'm still not clear how I get the address…
I've attached a patch that contains the addresses for all supported DIGIC II ... 5 cameras. It's a text file, just search for your cam, for example g1x 100e:
Code: [Select]
Index: platform/g1x/sub/100e/funcs_by_address.csv
===================================================================
--- platform/g1x/sub/100e/funcs_by_address.csv (revision 5154)
+++ platform/g1x/sub/100e/funcs_by_address.csv (working copy)
@@ -595,6 +595,7 @@
 0xff0977ac,j_PTM_BackupUIProperty_FW
 0xff0977b4,PTM_RestoreUIProperty_FW
 0xff099ec4,UIFS_CancelStoreLensTimer_FW
+0xff099f1c,cancel_lens_retract_timer
 0xff09a0d4,PB2Rec
 0xff09a114,Rec2PB
 0xff09a978,task_InitFileModules

This could be turned into a feature, but I could not decide on my own how to implement it.
- The script wrapper could simply call this function: that would mean the script author would need to make sure the call is made after every rec->play transition.
- The above logic could be implemented in CHDK core. In this case, the script command would enable/disable the retract override.

Since I don't write any serious scripts, I'd need the opinion of others who do.

edit:
The method only works if the retract delay is set to 1 minute on the Canon UI.
« Last Edit: 20 / March / 2019, 14:11:56 by srsa_4c »

Re: cancel retract timer
« Reply #2 on: 21 / March / 2019, 03:04:33 »
I've attached a patch that contains the addresses for all supported DIGIC II ... 5 cameras.

Thanks, that's a big help….

This could be turned into a feature,

I would definitely support that, although I can live with the current solution.

The method only works if the retract delay is set to 1 minute on the Canon UI.

Thanks for the hint. But that makes sense…
M100 100a, M3 101a, 2*G1x (101a,100e), S110 (103a), SX50 (100c), SX230 (101a), 2*S45,
Flickr https://www.flickr.com/photos/136329431@N06/albums
YouTube https://www.youtube.com/channel/UCrTH0tHy9OYTVDzWIvXEMlw/videos?shelf_id=0&view=0&sort=dd

*

Online reyalp

  • ******
  • 11848
Re: cancel retract timer
« Reply #3 on: 21 / March / 2019, 16:15:02 »
This could be turned into a feature, but I could not decide on my own how to implement it.
This seems like a worthwhile feature.

Quote
- The script wrapper could simply call this function: that would mean the script author would need to make sure the call is made after every rec->play transition.
- The above logic could be implemented in CHDK core. In this case, the script command would enable/disable the retract override.

Since I don't write any serious scripts, I'd need the opinion of others who do.
My initial reaction is scripts using this would probably be controlling rec/play transitions anyway, so requiring them to call the function isn't much burden. It also keeps things simple.

OTOH, if the logic can be implemented simply and reliably in the core, that there would be some potential benefits:
* A script could set it an then exit. But this is also a potential negative, if not intended.
* It could also support a menu option like the "disable LCD off...", but this seems like a very limited use case that probably doesn't need a menu option.

Don't forget what the H stands for.


*

Offline srsa_4c

  • ******
  • 3877
Re: cancel retract timer
« Reply #4 on: 21 / March / 2019, 19:07:51 »
if the logic can be implemented simply and reliably in the core
As I wrote above, we probably can't do much if the user chose '0 sec.' as lens retract delay on the Canon UI. We could 'fix' that by setting the retract param ourselves, but 1) we don't know the related param on all cams, 2) we don't set params. So, the method is less than reliable.
When implemented in core, though, chdkptp could make use of it (along with other stuff, like levent 4484 and disabling power save in rec mode).

BTW, despite the reliability issue, disabling the retract timer has a benefit over the other method (setting lens outside flag): the cam won't leave the lens out when shutting down.

Re: cancel retract timer
« Reply #5 on: 23 / March / 2019, 17:43:48 »
- The script wrapper could simply call this function: that would mean the script author would need to make sure the call is made after every rec->play transition.
- The above logic could be implemented in CHDK core. In this case, the script command would enable/disable the retract override.

Since I don't write any serious scripts, I'd need the opinion of others who do.
My initial reaction is scripts using this would probably be controlling rec/play transitions anyway, so requiring them to call the function isn't much burden. It also keeps things simple.
Simple is good. As long as the necessary sequence is documented.

Quote
It could also support a menu option like the "disable LCD off...", but this seems like a very limited use case that probably doesn't need a menu option.
Agreed on the limited use case.  I can't see of any reason to do this that does not involve running a script. Well, I suppose someone wanting their camera instantly ready to shoot but also concerned about battery life might find a use for it.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: cancel retract timer
« Reply #6 on: 24 / March / 2019, 02:30:26 »
I can't see of any reason to do this that does not involve running a script.
Especially with my last recordings in the macro range, it was necessary to control the focus in the playback. For this it was necessary to take some test shots and then to control them. When then the lens retracts, then you can start over again. Since a setting in the menu would be helpful.
but also concerned about battery life might find a use for it.
For most shots, I am more concerned by the resulting sensor temperatures (increase in noise) than by the battery life.
M100 100a, M3 101a, 2*G1x (101a,100e), S110 (103a), SX50 (100c), SX230 (101a), 2*S45,
Flickr https://www.flickr.com/photos/136329431@N06/albums
YouTube https://www.youtube.com/channel/UCrTH0tHy9OYTVDzWIvXEMlw/videos?shelf_id=0&view=0&sort=dd

 

Related Topics