Adding new cameras, applying patches into trunk (with source code prepared) - page 20 - General Discussion and Assistance - CHDK Forum

Adding new cameras, applying patches into trunk (with source code prepared)

  • 1679 Replies
  • 787853 Views
*

Offline philmoz

  • *****
  • 3450
    • Photos
Advertisements
I've added this in changeset 1128. I have not added it to the autobuild. Thoughts on the alleged camera damage in: http://chdk.setepontos.com/index.php?topic=5691.msg62825#msg62825 ?
Thanks, not having an autobuild should not be a problem - anyone who is really keen can use CHDK-Shell to build it. It seems to work best with exmem enabled and chdk loaded into exmem (loading at the start of the Canon heap only leaves ~40K free memory, quid came up with another load address; but I'm not convinced it's a good place to load CHDK).

I don't believe CHDK would cause the sort of problem being reported, other than from the fact that the camera is probably being used more intensively by CHDK users (maybe having the camera re-focus frequently when using the motion-detect scripts contributes to quicker wear). Achillies, unfortunately, has just had this problem on his camera; but it occurred when he was turning the camera on and off (switching between CHDK and SDM partitions on his SD card).

There also seems to be a lot of reports on the net of this lens error failure that are un-related to CHDK - could be a design flaw or a weakness in the lens mechanism. It is a small package to squeeze a 12x zoom lens into - I wonder how the SX220 / SX230 will fare with their 14x zoom?

I'll add a message to sx130 thread that the code is available along with another warning of the possible dangers.

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

*

Offline reyalp

  • ******
  • 14082
I don't believe CHDK would cause the sort of problem being reported, other than from the fact that the camera is probably being used more intensively by CHDK users (maybe having the camera re-focus frequently when using the motion-detect scripts contributes to quicker wear). Achillies, unfortunately, has just had this problem on his camera; but it occurred when he was turning the camera on and off (switching between CHDK and SDM partitions on his SD card).
Yes, my guess is that this model just has a marginal lens mechanism. That said, I'd rather err on the side of caution when it involves other peoples $200+ toys.
Don't forget what the H stands for.

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re-write of rbf_font.c to avoid cached/uncached memory issue (http://chdk.setepontos.com/index.php?topic=6261.0).
Also cleaned up a few areas of the code and added some comments.

Phil.

Edit:
Some users have reported that the beta SX30IS version that includes this patch does not display any text in the menus after updating CHDK. I am investigating.
- Patch file removed due to bug when starting camera with no config file (default values). No text displayed in menus.
« Last Edit: 09 / April / 2011, 00:23:25 by philmoz »
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)



Re-write of rbf_font.c to avoid cached/uncached memory issue (http://chdk.setepontos.com/index.php?topic=6261.0).
Also cleaned up a few areas of the code and added some comments.

Phil.


Phil, this patch does not want to install for me with chdk shell...says something about a unified diff?

Not sure what to do with this.

thanks!
sx20is 1.02d

*

Offline whim

  • ******
  • 2046
  • A495/590/620/630 ixus70/115/220/230/300/870 S95
Hi bdasmith,

Gave this a shot for you - turns out Phil's paths are different from CHDK-Shell's
(it uses the root of the build as working directory, so it does not "see"  'trunk',
 and even if it did, it would expect 'trunk1132'  i.o. 'trunk')

try changing (lines 3 & 4 in the patch):
Quote
--- trunk/lib/font/rbf_font.c   (revision 1132)
+++ trunk/lib/font/rbf_font.c   (working copy)
to:
Quote
--- lib/font/rbf_font.c   (revision 1132)
+++ lib/font/rbf_font.c   (working copy)
and it should work (as in: a 'test only' mode patch succeeded) [edit: tested, works fine]

hope that works for you too,

wim

[ PS Tested some more: CHDK-Shell's patch and diff commands use/generate paths relative to build's root,
  so this is something to check for if things appear not to work ]
« Last Edit: 08 / April / 2011, 19:34:05 by whim »

*

Offline philmoz

  • *****
  • 3450
    • Photos
Repost of the earlier re-write of rbf_font.c to avoid cached/uncached memory issue (http://chdk.setepontos.com/index.php?topic=6261.0).
(Fixed problem with this change when starting camera with no config file, where no menu text displayed).
Also cleaned up a few areas of the code and added some comments.
This version also avoids copying the 'current_font' data into the rbf_font when there is no custom font being loaded. Instead it calls back to draw_char (in gui_draw.c) to display the 'current_font' characters.

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

Updates to IXUS120-SD940 to add firmware 1.03B
Patch file attached to add support for version 1.03b firmware of the IXUS120-SD940.  Port created by rulen.
Ported :   A1200    SD940   G10    Powershot N    G16


*

Offline philmoz

  • *****
  • 3450
    • Photos
As discussed in this topic http://chdk.setepontos.com/index.php?topic=6267.0 here is the patch to split the current camera.h monster into separate files in the platform/camera directories.

The perl script I used to do this is also attached. This works on CHDK-DE and SDM as well.

I have added defaults into the main camera.h for the values that did not have any placeholder there and done a little bit of re-organising.

Also added a new setting which can be used override the hard coded DNG exposure bias setting (code inserts a value of -0.5 into the DNG header, which explains why my DNG files always came out underexposed!). (Use of this in dng.c will be in a later patch).

I am working on a new tool to take all the defaults and camera values and generate a tabular file with all the cameras and values (like what CHDK-Shell can do) - unless whim beats me to it :)

Edit: patch updated to include platform_camera.h for A580 just added.

Regards,
Phil.


« Last Edit: 10 / April / 2011, 03:12:59 by philmoz »
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

Patch file attached to add support for version 1.03b firmware of the IXUS120-SD940. 
I'm kind of hoping that this gets in under the wire ahead of ths :
As discussed in this topic http://chdk.setepontos.com/index.php?topic=6267.0 here is the patch to split the current camera.h monster into separate files in the platform/camera directories.
Ported :   A1200    SD940   G10    Powershot N    G16

 

Related Topics