Author Topic: SX200is Porting  (Read 102093 times)

Online reyalp

  • Guru Member
  • ******
  • Posts: 4468
Re: SX200is Porting
« Reply #465 on: 25 / September / 2009, 13:18:30 »
to OldGit
Bracketing full worked with my last message see too:
Ihar, CAM_BRACKETING is for canon bracketing, not CHDK bracketing.
Don't forget what the H stands for.

Online reyalp

  • Guru Member
  • ******
  • Posts: 4468
Re: SX200is Porting
« Reply #466 on: 25 / September / 2009, 13:20:30 »
Hi all
 Patch for bracketing (about "dng disable" in timer)

problem with code
Code: [Select]
shooting_get_prop(PROPCASE_DRIVE_MODE)

for sx200 need
Code: [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:
I think we should make all use of shooting_get_prop(PROPCASE_DRIVE_MODE) use shooting_get_drive_mode() instead.
Don't forget what the H stands for.

Online reyalp

  • Guru Member
  • ******
  • Posts: 4468
Re: SX200is Porting
« Reply #467 on: 25 / September / 2009, 13:24:13 »
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.
You can check the latest trunk and send patches for anything that needs fixing ;)

Thanks for all your work, even though some of it frustrated me you did a great job with the weird screen layout.
Don't forget what the H stands for.

Offline OldGit

  • Sr. Member
  • ****
  • Posts: 303
Re: SX200is Porting
« Reply #468 on: 25 / September / 2009, 13:33:19 »
@reyalp,
thank you very much for all your hard work on this, I know we all appreciate it.

ALL
please follow what reyalp has said....
Get the 804 trunk
produce your patch or patches
explain what you are patching, how and why
This will allow the fixes to be applied a lot faster.

and thanks to you all for the work.
OldGit
SX200 IS-100C

Offline ihar

  • Jr. Member
  • **
  • Posts: 55
Re: SX200is Porting
« Reply #469 on: 25 / September / 2009, 13:34:58 »

Ihar, CAM_BRACKETING is for canon bracketing, not CHDK bracketing.
I'm sorry,

I was mistaken, all is true
Ihar

Online reyalp

  • Guru Member
  • ******
  • Posts: 4468
Re: SX200is Porting
« Reply #470 on: 25 / September / 2009, 13:38:52 »
explain what you are patching, how and why
This will allow the fixes to be applied a lot faster.
If you can't explain in english, you can try in your own language. There are many people here who can help translate if needed. Or I can use google and have something to  :lol about ;)
Don't forget what the H stands for.

Offline ihar

  • Jr. Member
  • **
  • Posts: 55
Re: SX200is Porting
« Reply #471 on: 25 / September / 2009, 13:44:57 »
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?
Here where there is such design:
core/gui_osd.c
core/lua_script.c
core/raw.c
lib/ubasic/ubasic.c

It will relieve from superfluous #ifdef and possible errors.

Thanks,
Ihar

Online reyalp

  • Guru Member
  • ******
  • Posts: 4468
Re: SX200is Porting
« Reply #472 on: 25 / September / 2009, 14:08:33 »
Whether it is possible to make everywhere this replacement?
Done.
Don't forget what the H stands for.

Offline fe50

  • Guru Member
  • ******
  • Posts: 2602
  • IXUS50 & 860, SX10 Star WARs-Star RAWs
Re: SX200is Porting
« Reply #473 on: 25 / September / 2009, 15:10:02 »
@reyalP & others...
I've updated the http://chdk.wikia.com/wiki/Propertycase with the "new" 102 values...

CHDK Forum

Re: SX200is Porting
« Reply #473 on: 25 / September / 2009, 15:10:02 »

Online reyalp

  • Guru Member
  • ******
  • Posts: 4468
Re: SX200is Porting
« Reply #474 on: 25 / September / 2009, 15:14:53 »
@reyalP & others...
I've updated the http://chdk.wikia.com/wiki/Propertycase with the "new" 102 values...

Can you check 223 on sx10 ?
Don't forget what the H stands for.

Offline whim

  • Guru Member
  • ******
  • Posts: 1954
  • A620/A630/A590-101b/i70-101b/i870-101a/i300
Re: SX200is Porting
« Reply #475 on: 25 / September / 2009, 15:45:17 »
@fe50

http://chdk.wikia.com/wiki/Propertycase

Quote
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


this can't be true - 5 values / 4 states ?????

(or, if it is, it's confusing ...)

wim
« Last Edit: 25 / September / 2009, 15:47:01 by whim »

Offline ihar

  • Jr. Member
  • **
  • Posts: 55
Re: SX200is Porting
« Reply #476 on: 25 / September / 2009, 15:51:06 »
Hi whim

On SX 200 IS 0,1,2,3,4=Off, 2 Second, 10 Second, Custom, Face Detection

Simply 10 sec have passed

Ihar

Offline fe50

  • Guru Member
  • ******
  • Posts: 2602
  • IXUS50 & 860, SX10 Star WARs-Star RAWs
Re: SX200is Porting
« Reply #477 on: 25 / September / 2009, 16:10:37 »
@all:
I've updated the http://chdk.wikia.com/wiki/Propertycase:

223       (Self)Timer Mode setting (0,1,2: 0=2 Second, 1=10 Second, 2=Custom) - this is NOT the drive mode; for drive mode see #102


On SX 200 IS 0,1,2,3,4=Off, 2 Second, 10 Second, Custom, Face Detection

I guess you mean #102 (drive mode) with those values; the #223 is independend from the drive mode, it's what you've set up in the Canon Timer / Self-Timer menu.
The #102 values changes when you switch to another drive mode; the #223 values don't change in this case, they change when you edit the (self)timer values in the Canon mode & confirm them...

Offline ihar

  • Jr. Member
  • **
  • Posts: 55
Re: SX200is Porting
« Reply #478 on: 25 / September / 2009, 16:25:05 »
In any case on sx200is there are differences from standard value and it is necessary to specify it.

i see on http://chdk.wikia.com/wiki/Propertycase:

Timer Mode (0,1,2 = 2 Seconds, 10 Seconds, Custom), On SX 200 IS 0,1,2,3,4=Off, 2 Seconds, 10 Seconds, Custom, Face Detection
About drive mode there it is not underlined

Offline ADamb

  • Rookie
  • *
  • Posts: 35
Re: SX200is Porting
« Reply #479 on: 25 / September / 2009, 17:08:16 »
Zoom table tuned like sx10
platform\sx200is\main.c, replace lines 65-92
Code: [Select]
//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  5458
const 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;
}
SX200 IS-100C

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal