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

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

  • 1685 Replies
  • 934493 Views
*

Offline philmoz

  • *****
  • 3450
    • Photos
Advertisements
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.

I've checked your ixus120 patch and the only file we are both patching is makefile.inc in the root directory. If your patch is applied first I may need to redo mine, unless reyalp (or whoever merges the changes) fixes it manually.

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

  • ******
  • 14140
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.
Added changeset 1134

@philmoz: I don't think I'll have trouble with makefile.inc, but I'm not sure how many of the pending patches I'll be able to get to this weekend.

edit
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]
Just FWIW, I prefer patches in the second format, e.g. relative to the top of the trunk (or whatever branch it belongs to) not the top of the svn repo.
« Last Edit: 10 / April / 2011, 01:50:59 by reyalp »
Don't forget what the H stands for.

*

Offline reyalp

  • ******
  • 14140
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.
Added, changeset 1135
Don't forget what the H stands for.

*

Offline reyalp

  • ******
  • 14140
Don't forget what the H stands for.

*

Offline whim

  • ******
  • 2046
  • A495/590/620/630 ixus70/115/220/230/300/870 S95
@philmoz

Quote
unless whim beats me to it
not likely (ETA = somewhere next week)

BTW, your latest perl script, when applied to 1138, on compilation gives me (on any cam tested)
Quote
In file included from ../../include/stdlib.h:1:0,
                 from font_8x16.c:2:
../../include/camera.h:126:29: fatal error: platform_camera.h: No such file or directory
compilation terminated.
C:\CHDK\gcc451\bin\gmake.exe[2]: *** [font_8x16.o] Error 1
C:\CHDK\gcc451\bin\gmake.exe[1]: *** [all-recursive] Error 1
gmake: *** [all-recursive] Error 1
gmake: *** Waiting for unfinished jobs....

incidentally, previous version gave exact same error on 1132
(and yes, I checked that the files are present)

sorry, did not have time to debug above further yet,

wim



*

Offline philmoz

  • *****
  • 3450
    • Photos
In file included from ../../include/stdlib.h:1:0,
                 from font_8x16.c:2:
../../include/camera.h:126:29: fatal error: platform_camera.h: No such file or directory
compilation terminated.

The perl script does not modify makefile.inc to add the platform/camera directory to the search path.
You need to apply the patch or manually update makefile.inc by changing
    CFLAGS+=-I$(topdir)include $(PLFLAGS) $(CPPFLAGS)
to
    CFLAGS+=-I$(topdir)include -I$(topdir)platform/$(PLATFORM) $(PLFLAGS) $(CPPFLAGS)

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)

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.




after applying this patch on chdk shell 3.12, it tried to restart and returned the error: Array variable has incorrect number of subscripts or subscript dimension range exceeded.

just wanted to let you know.

I appreciate your work!
sx20is 1.02d

Patch to camera.h for IXUS120 SD940 (all versions) to enable fix for camera crash at startup when opening the conf / font files  (CAM_STARTUP_CRASH_FILE_OPEN_FIX) per http://chdk.setepontos.com/index.php?topic=6179.0   

(@reyalp - I think I now have the relative file position in the patch right per your request in this thread ?)                                          
« Last Edit: 10 / April / 2011, 17:12:06 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline reyalp

  • ******
  • 14140
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.
Added, changeset 1140. I hope this doesn't end up being a mistake :-[

Don't forget what the H stands for.

*

Offline reyalp

  • ******
  • 14140
Patch to camera.h for IXUS120 SD940 (all versions) to enable fix for camera crash at startup when opening the conf / font files  (CAM_STARTUP_CRASH_FILE_OPEN_FIX) per http://chdk.setepontos.com/index.php?topic=6179.0   
Added, changeset 1141
Quote
(@reyalp - I think I now have the relative file position in the patch right per your request in this thread ?)                                          
I don't recall problems with yours, some from philmoz had 'trunk' in them. It's not a big deal.
Don't forget what the H stands for.

 

Related Topics


SimplePortal © 2008-2014, SimplePortal