Patch to add USB remote precision sync code to the 1.3.0 trunk. Only enabled for A1200 at this point. Details posted here in forum thread : http://chdk.setepontos.com/index.php?topic=8312.msg108644#msg108644 Note : unused #define SYNCHABLE_REMOTE_NOT_ENABLED in camera.h & ixus200_sd980/platform_carmera.h removed.
Currently usb_remote.c is built as platform independent code. It should not include platform_camera.h or have any platform dependent #ifdef code. Either make the decisions at run time from camera_info state variables, or move usb_remote.c to be part of the platform dependent code (platform/makefile_sub.inc).
Quote from: philmoz on 01 / January / 2014, 23:54:53Currently usb_remote.c is built as platform independent code. It should not include platform_camera.h or have any platform dependent #ifdef code. Either make the decisions at run time from camera_info state variables, or move usb_remote.c to be part of the platform dependent code (platform/makefile_sub.inc).I think I know the answer to this, but why?
Platform independent code is only compiled once for all cameras in the batch build. If it contains platform dependent stuff, then every camera will get the settings from the first one compiled. It can also be converted to a module more easily.
Either make the decisions at run time from camera_info state variables, or move usb_remote.c to be part of the platform dependent code (platform/makefile_sub.inc).
Index: lib/core/Makefile===================================================================--- lib/core/Makefile (revision 3301)+++ lib/core/Makefile (working copy)@@ -11,7 +11,7 @@ OBJS = gui_batt.o gui_space.o gui_usb.o gui_mbox.o gps.o gui_script.o gui_menu.o gui_user_menu.o OBJS+= suba.o levent.o console.o gps_math.o live_view.o ptp.o action_stack.o script.o-OBJS+= usb_input.o usb_module.o usb_remote.o autoiso.o+OBJS+= autoiso.o OBJS+= $(topdir)modules/exportlist.inc module_load.o modules.o all: libcore.aIndex: platform/makefile_sub.inc===================================================================--- platform/makefile_sub.inc (revision 3301)+++ platform/makefile_sub.inc (working copy)@@ -16,7 +16,7 @@ #add platform dependent 'core' files (build as THUMB) OBJS+=main.thm.o gui_draw.thm.o memmgmt.thm.o \ gui.thm.o kbd_process.thm.o conf.thm.o gui_osd.thm.o raw.thm.o \- shot_histogram.thm.o shooting.thm.o camera_info.thm.o remotecap.thm.o+ shot_histogram.thm.o shooting.thm.o usb_input.thm.o usb_module.thm.o usb_remote.thm.o camera_info.thm.o remotecap.thm.o libplatformsub.a: $(OBJS) bin_compat.h
I would suggest moving just that code to a function in a platform dependent file (core/usb_sync.c?). The function can be NOP if CAM_REMOTE_USES_PRECISION_SYNC is not defined. I think your makefile is correct, but you should only have to move the one file, not the other usb remote related files. Being compiled as thumb is not a change, since the lib/core files are also thumb.
Quote from: reyalp on 02 / January / 2014, 15:34:47I would suggest moving just that code to a function in a platform dependent file (core/usb_sync.c?). The function can be NOP if CAM_REMOTE_USES_PRECISION_SYNC is not defined. I think your makefile is correct, but you should only have to move the one file, not the other usb remote related files. Being compiled as thumb is not a change, since the lib/core files are also thumb.Moved wait_until_remote_button_is_released() into its own platform dependent file and added to platform/makefile_sub.inc .
Started by andre117 General Discussion and Assistance
Started by Bernd R General Discussion and Assistance
Started by quid « 1 2 » General Discussion and Assistance
Started by zell « 1 2 » General Discussion and Assistance
Started by srsa_4c « 1 2 » General Discussion and Assistance