Still experimenting with state_shooting_progress. Also inspected core/main.c again. Unlike what I wrote above, some shooting related conditional parts of spytask are effective even in remote target mode. Many - raw related - parts of CHDK set state_shooting_progress to SHOOTING_PROGRESS_PROCESSING. Doing this in remotecap.c (or at the start of the raw hook in generic/capt_seq.c) works, with one drawback: shoot() won't finish until review time is over (issue observed on the
A410, and is probably unrelated to these experiments). The block is caused by PROPCASE_SHOOTING, see shooting_in_progress(). This doesn't prevent another rs from executing, but other scripts will not run until PROPCASE_SHOOTING becomes 0 again.
#1
Index: core/remotecap.c
===================================================================
--- core/remotecap.c (revision 2141)
+++ core/remotecap.c (working copy)
@@ -212,7 +212,7 @@
// allow raw hook to continue
// TODO could do like filewrite wait
hook_raw_save_complete();
- state_shooting_progress=SHOOTING_PROGRESS_DONE; //shoot() needs this... TODO
+ state_shooting_progress=SHOOTING_PROGRESS_PROCESSING;
}
}
or
#2
Index: platform/generic/capt_seq.c
===================================================================
--- platform/generic/capt_seq.c (revision 2141)
+++ platform/generic/capt_seq.c (working copy)
@@ -50,10 +50,12 @@
}
else if ( (remotecap_get_target() & 2) > 0 ) //chdk raw requested
{
+ state_shooting_progress=SHOOTING_PROGRESS_PROCESSING;
remotecap_raw_available();
}
else
{
+ state_shooting_progress=SHOOTING_PROGRESS_PROCESSING;
raw_save_stage = RAWDATA_SAVED;
}
#else
[hr]
reyalp
- should the remote capture selection only apply to the next shot, like exposure overrides, or should you need to explicitly cancel it ?
My initial code used the latter (rs sets it up at start and resets it when it has finished). Probably both approach should deal with the possibility of PTP connection problems.
If it's left on after the PTP connection goes away, that could confuse users. We don't explicitly know whether there is a PTP connection, but I guess we could check USB power is present (and clear remotecap if it's not found ?).
Could be good enough, until somebody decides to allow usb remote and ptp at the same time if that's possible at all (physw bit override or eventprocs like ConnectUSBCable, etc.)
Setting it once per shot shouldn't be much of a burden if you are using script to shoot, but I guess you could potentially set it once and have the user manually shooting with the shutter ?
Maybe. There are also some G series cams with proper remote control socket.
[hr]
Committed my changes (changeset 2144), chose #1 from above.
The client (the code I know) was already prepared, so it will continue to work. RemoteCaptureGetData's Param2 returned parameter has slightly changed in its interpretation: it no longer shows the transferred chunk's type. I chose to increment PTP_CHDK_VERSION_MINOR to 104 (the hundreds shall reflect test revisions 😀 )
[hr]Tried and failed miserably to split the code part marked with [tt]//TODO turn this into a function[/tt] in core/remotecap.c, remotecap_get_data_chunk(). With that code in a separate function (6 params), called by the raw and yuv cases, the asm code size almost doubled. Leaving it as it is, it's ugly but saves space...