to OldGitBracketing full worked with my last message see too:
Hi all Patch for bracketing (about "dng disable" in timer)problem with codeCode: [Select]shooting_get_prop(PROPCASE_DRIVE_MODE)for sx200 needCode: [Select]shooting_get_drive_mode()As it is a synonym it is theoretically possible to replace without a condition #ifdef, but just in case we do so:
shooting_get_prop(PROPCASE_DRIVE_MODE)
shooting_get_drive_mode()
reyalp, do you need something for me?. I've modified camera.h in order to clean up the defines and edgeoverlay without debugs, and so on, but I don't know if it's convenient that I send you that or not. What you prefer.This weekend I will have time to adjust the display patches in the way you think more convenient.
Ihar, CAM_BRACKETING is for canon bracketing, not CHDK bracketing.
explain what you are patching, how and whyThis will allow the fixes to be applied a lot faster.
I think we should make all use of shooting_get_prop(PROPCASE_DRIVE_MODE) use shooting_get_drive_mode() instead.
Whether it is possible to make everywhere this replacement?
@reyalP & others...I've updated the http://chdk.wikia.com/wiki/Propertycase with the "new" 102 values...
223 Timer Mode (0,1,2 = 2 Second, 10 Second, Custom), On SX 200 IS 0,1,2,3,4=Off, 2 Second, Custom, Face Detection
On SX 200 IS 0,1,2,3,4=Off, 2 Second, 10 Second, Custom, Face Detection
//zoom position is get_parameter_data(87)static const struct { int zp, fl;} fl_tbl[] = { { 0, 5000}, { 16, 6800}, { 32, 9100}, { 62, 16200}, { 78, 22300}, { 102, 35900}, { 125, 60000},};#define NUM_FL (sizeof(fl_tbl)/sizeof(fl_tbl[0]))// Focal length range is 5.0 - 60,0 mm, 27.3 - 327.4 in 35-mm equivalent.// So, CF_EFL = 27.3/5.0*10000=54600 or327.4/60*10000=54566.6// diff = 54600 - 54566.6 = 33.3, split it 33.3 / 2 = 16.6// add to base 54566.6 + 16.6 = 54583.2// divide by 10 to avoid overflow in get_effective_focal_length()#define CF_EFL 5458const int zoom_points = 126;int get_effective_focal_length(int zp) { return (CF_EFL*get_focal_length(zp))/1000;}int get_focal_length(int zp) { int i; if (zp<fl_tbl[0].zp) return fl_tbl[0].fl; else if (zp>fl_tbl[NUM_FL-1].zp) return fl_tbl[NUM_FL-1].fl; else for (i=1; i<NUM_FL; ++i) { if (zp==fl_tbl[i-1].zp) return fl_tbl[i-1].fl; else if (zp==fl_tbl[i].zp) return fl_tbl[i].fl; else if (zp<fl_tbl[i].zp) return fl_tbl[i-1].fl+(zp-fl_tbl[i-1].zp)*(fl_tbl[i].fl-fl_tbl[i-1].fl)/(fl_tbl[i].zp-fl_tbl[i-1].zp); } return fl_tbl[NUM_FL-1].fl;}int get_zoom_x(int zp) { return get_focal_length(zp)*10/fl_tbl[0].fl;}