And write own OS? No! Find utime() much easier.
And I have an idea where to look for it (=>red-eye editing function).
And about auto-adjust CHDK startup time:
If core_spytask() waits while InitFileModules task runs, and then reads config file etc. - it works on a710. Can you verify this on a720?
Should work. We already hook task_InitFileModules for SDHC-support. I'll test it this evening when I'm home.
update:I did a test, and it worked. To circumvent the one-file-problem, I did the same we already do to signal raw-data availability - call a function in core/main.c.
Here's a svn diff to rev. 269: (this sounds like the right time to ask for svn-write-access
)
Index: include/core.h
===================================================================
--- include/core.h (revision 269)
+++ include/core.h (working copy)
@@ -11,6 +11,7 @@
void gui_init();
void core_rawdata_available();
+void core_spytask_can_start();
#define NOISE_REDUCTION_AUTO_CANON (0)
#define NOISE_REDUCTION_OFF (1)
Index: platform/a720/sub/100c/boot.c
===================================================================
--- platform/a720/sub/100c/boot.c (revision 269)
+++ platform/a720/sub/100c/boot.c (working copy)
@@ -1289,11 +1289,14 @@
"MOVNE R0, R5\n"
"BLNE sub_FFC5B69C\n"
"BL sub_FFC5A4E8_my\n" // continue to SDHC-hook here!
+
+ "BL core_spytask_can_start\n" // CHDK: Set "it's-save-to-start"-Flag for spytask
+
"CMP R4, #0\n"
"MOVEQ R0, R5\n"
"LDMEQFD SP!, {R4-R6,LR}\n"
"MOVEQ R1, #0\n"
- "BEQ sub_FFC5B69C\n"
+ "BEQ sub_FFC5B69C\n" // cameralog "LogicalEvent...", it's save to run this after spytask has started
"LDMFD SP!, {R4-R6,PC}\n"
);
}; //#fe
Index: core/main.c
===================================================================
--- core/main.c (revision 269)
+++ core/main.c (working copy)
@@ -61,6 +61,10 @@
raw_data_available = 1;
}
+void core_spytask_can_start() {
+ spytask_can_start = 1;
+}
+
void core_spytask()
{
int cnt = 1;
Index: version.inc
===================================================================
--- version.inc (revision 269)
+++ version.inc (working copy)
@@ -1 +1 @@
-BUILD_NUMBER := 17
+BUILD_NUMBER := 24
With the changes, CHDK starts virtually immediately (very shortly after the display was enabled), file access still works as expected.
I can also confirm BB's observation that
only the first raw has the wrong time. I traced the problem a little and this is what I found:
* Every file creation that takes place
before the camera has written a file by itself, gets the wrong time.
*
After the camera has wrote a file by itself, the files created by CHDK have the proper time/date.
(tested by doing raw-avg several times, then shooting one jpg (no raw!), then raw-avg. again)
Cheers.