I came up with this patch, testing a theory. Test builds for sx210 and sx230 101b are attached.
The change, compared to ztest4, is that set_zoom won't attempt focusing when servo AF or continuous AF is active.
Any crashes when using these builds? I can't get my sx280 to crash either using a vanilla build or with this mod.
Index: core/shooting.c
===================================================================
--- core/shooting.c (revision 5266)
+++ core/shooting.c (working copy)
@@ -1212,7 +1212,25 @@
#if defined(CAM_NEED_SET_ZOOM_DELAY)
msleep(CAM_NEED_SET_ZOOM_DELAY);
#endif
+#if defined(CAM_FOCUS_AFTER_ZOOM_ONLY_WHEN_POSSIBLE)
+ if (
+#ifdef PROPCASE_CONTINUOUS_AF
+ !shooting_get_prop(PROPCASE_CONTINUOUS_AF)
+#else
+ 1
+#endif
+#ifdef PROPCASE_SERVO_AF
+ &&
+ !shooting_get_prop(PROPCASE_SERVO_AF)
+#endif
+ )
+ {
+ while (focus_busy) msleep(10);
+ shooting_set_focus(dist, SET_NOW);
+ }
+#else // !CAM_FOCUS_AFTER_ZOOM_ONLY_WHEN_POSSIBLE
shooting_set_focus(dist, SET_NOW);
+#endif // CAM_FOCUS_AFTER_ZOOM_ONLY_WHEN_POSSIBLE
}
}
Index: include/camera.h
===================================================================
--- include/camera.h (revision 5266)
+++ include/camera.h (working copy)
@@ -237,6 +237,7 @@
// different from CAM_USB_EVENTID since it should be undefined on most cameras
#undef CAM_NEED_SET_ZOOM_DELAY // Define to add a delay after setting the zoom position before resetting the focus position in shooting_set_zoom
+ #undef CAM_FOCUS_AFTER_ZOOM_ONLY_WHEN_POSSIBLE // When defined: wait in shooting_set_zoom() while focus busy, skip focusing in continuous focus modes
#undef CAM_USE_ALT_SET_ZOOM_POINT // Define to use the alternate code in lens_set_zoom_point()
#undef CAM_USE_ALT_PT_MoveOpticalZoomAt // Define to use the PT_MoveOpticalZoomAt() function in lens_set_zoom_point()
Index: platform/sx210is/platform_camera.h
===================================================================
--- platform/sx210is/platform_camera.h (revision 5266)
+++ platform/sx210is/platform_camera.h (working copy)
@@ -107,6 +107,11 @@
#define CAM_AV_OVERRIDE_IRIS_FIX 1
+ #define CAM_FOCUS_AFTER_ZOOM_ONLY_WHEN_POSSIBLE 1 // alternative code path in shooting_set_zoom()
+ #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 5266)
+++ 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 5266)
+++ 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
Index: platform/sx280hs/platform_camera.h
===================================================================
--- platform/sx280hs/platform_camera.h (revision 5266)
+++ platform/sx280hs/platform_camera.h (working copy)
@@ -133,7 +133,8 @@
#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_NEED_SET_ZOOM_DELAY 300
+ //#define CAM_NEED_SET_ZOOM_DELAY 300
+ #define CAM_FOCUS_AFTER_ZOOM_ONLY_WHEN_POSSIBLE 1 // alternative code path in shooting_set_zoom()
#define MKDIR_RETURN_ONE_ON_SUCCESS 1 // mkdir() return 1 on success, 0 on fail.