Next try of the focus_busy patch (debug version), with the focus_busy check moved to shooting_set_focus().
Index: core/main.c
===================================================================
--- core/main.c (revision 5272)
+++ core/main.c (working copy)
@@ -81,6 +81,13 @@
finished();
}
+// for debug display
+static int misci[2] = {0,0};
+void main_incmisci(int which, int val)
+{
+ misci[which] += val;
+}
+
int core_get_free_memory()
{
cam_meminfo camera_meminfo;
@@ -326,10 +333,10 @@
i = 0;
-#ifdef DEBUG_PRINT_TO_LCD
- sprintf(osd_buf, "%d", cnt ); // modify cnt to what you want to display
+//#ifdef DEBUG_PRINT_TO_LCD
+ sprintf(osd_buf, "%d:%d", misci[0], misci[1] ); // modify cnt to what you want to display
draw_txt_string(1, i++, osd_buf, user_color(conf.osd_color));
-#endif
+//#endif
#if defined(OPT_FILEIO_STATS)
sprintf(osd_buf, "%3d %3d %3d %3d %3d %3d %3d %4d",
camera_info.fileio_stats.fileio_semaphore_errors, camera_info.fileio_stats.close_badfile_count,
Index: core/shooting.c
===================================================================
--- core/shooting.c (revision 5272)
+++ core/shooting.c (working copy)
@@ -1250,6 +1250,26 @@
}
if (!conf.dof_use_exif_subj_dist && (s != INFINITY_DIST))
s+=shooting_get_lens_to_focal_plane_width();
+
+ // Wait while focus is reported busy, return without setting focus on timeout
+ int rep = 100; // wait up to 1 second
+ while (focus_busy) {
+ if (--rep <= 0) {
+#if 1
+ extern void main_incmisci(int which, int val);
+ main_incmisci(0,1);
+#endif
+ return;
+ }
+ msleep(10);
+ }
+#if 1
+ if (rep < 100) {
+ extern void main_incmisci(int which, int val);
+ main_incmisci(1,1);
+ }
+#endif
+
lens_set_focus_pos(s);
}
else
Index: platform/sx210is/platform_camera.h
===================================================================
--- platform/sx210is/platform_camera.h (revision 5272)
+++ platform/sx210is/platform_camera.h (working copy)
@@ -107,6 +107,10 @@
#define CAM_AV_OVERRIDE_IRIS_FIX 1
+ #define CAM_USE_OPTICAL_MAX_ZOOM_STATUS 1 // Use ZOOM_OPTICAL_MAX to reset zoom_status when switching from digital to optical zoom in gui_std_kbd_process()
+ #define CAM_USE_ALT_SET_ZOOM_POINT 1 // Define to use the alternate code in lens_set_zoom_point()
+ #define CAM_USE_ALT_PT_MoveOpticalZoomAt 1 // Define to use the PT_MoveOpticalZoomAt() function in lens_set_zoom_point()
+
#define CAM_SD_OVER_IN_AFL 1
#define CAM_SD_OVER_IN_MF 1
Index: platform/sx210is/sub/100c/stubs_entry.S
===================================================================
--- platform/sx210is/sub/100c/stubs_entry.S (revision 5272)
+++ platform/sx210is/sub/100c/stubs_entry.S (working copy)
@@ -42,7 +42,7 @@
DEF(canon_menu_active ,0x0000368c) // Found @0xff891c4c
DEF(canon_shoot_menu_active ,0x00008511) // Found @0xff9b5a6c
DEF(playrec_mode ,0x000033bc) // Found @0xff883e64
-//DEF(zoom_status ,0x0000d544) // Found @0xffad4e40, ** != ** stubs_min = 0x0000d524 (0xD524)
+DEF(zoom_status ,0x0000d544) // Found @0xffad4e40
DEF(some_flag_for_af_scan ,0x000075d8) // Found @0xff970d5c
// focus_len_table contains zoom focus lengths for use in 'get_focal_length' (main.c).
// each entry contains 3 int value(s), the first is the zoom focus length.
@@ -50,7 +50,7 @@
DEF(focus_len_table ,0xfffea1cc) // Found @0xfffea1cc
DEF(zoom_busy ,0x00007140) // Found @0xff969464
DEF(focus_busy ,0x00006fc8) // Found @0xff9639d0
-//DEF(recreview_hold ,0x00004140) // Found @0xff8a3648, ** != ** stubs_min = 0x00008144 (0x804C+0xF8)
+DEF(recreview_hold ,0x00004140) // Found @0xff8a3648
DEF(viewport_buffers ,0xffb64808) // Found @0xff84fd4c
DEF(active_viewport_buffer ,0x00002058) // Found @0xff84fae8
// Camera appears to have only 1 RAW buffer @ 0x41db3b80 (Found @0xffb2fb2c)
Index: platform/sx210is/sub/100c/stubs_min.S
===================================================================
--- platform/sx210is/sub/100c/stubs_min.S (revision 5272)
+++ platform/sx210is/sub/100c/stubs_min.S (working copy)
@@ -1,7 +1,5 @@
#include "stubs_asm.h"
-DEF(zoom_status, 0xD524) // ASM1989 09.19.10 -> FFAD4E40 Like in sx20 at FFAAF3EC search for "TerminateDeliverToZoomController"
-DEF(recreview_hold, 0x804C + 0xF8) // ASM1989 08.30.2010 looks like FF9A0B38 0x804C but not sure about 0x0C -> Not Ok 09.19.10 FF9A1684 like in sx20 was F8
DEF(enabled_refresh_physical_screen, 0x9D48+0x20) // found at FFA1EE18 and FFA1EFB4 and FFA1EE5C -> ASM1989 08.21.2010 ?guesswork, FFA1EDDC ->0x20 , but maybe 24???
DEF(led_table, 0x24A0 + 0x04) // found at FF860EF0 & FF860EEC -> ASM1989 08.21.2010 double checked
It draws two numbers permanently on screen. First one would increase when setting focus failed due to a focus_busy timeout, second one would increase when focus was busy but did not time out. I've yet to find a camera where any of those numbers change from zero. Does anyone want test builds with this change?