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

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

  • 1685 Replies
  • 846297 Views
*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: Adding new cameras, applying patches into trunk (with source code prepared)
« Reply #1000 on: 17 / February / 2013, 21:24:39 »
Advertisements
Patch file to add a script function md_get_cell_val() that returns motion detection actual cell values rather than just differences as returned by md_get_cell_diff().

Discussion thread is here :  http://chdk.setepontos.com/index.php?topic=9437.0

Per the linked thread, function can be useful in MD scripts for determining if a scene has returned to its original quiescent state.  Should also be very handy for implementing AGC for the md_detect_motion()'s sensitivity parameter.



Two small patches to enable MD testing for the G10 and ixus120_sd940.

Added in revision 2581 (trunk only).

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 philmoz

  • *****
  • 3450
    • Photos
Re: Adding new cameras, applying patches into trunk (with source code prepared)
« Reply #1001 on: 17 / February / 2013, 21:30:13 »
For vxworks, we need to find sys_mempart_id, which I haven't finished doing for all cameras. Baring typos, I think to should be safe to turn on for all that have been found.
From a quick look, sys_mempart_id could be found by looking at an eventproc named "memShow" which is a wrapper for memPartShow. The latter needs sys_mempart_id as its first param.
Done. I have also verified the already found values (A, G series) except for a570 101a (that dump seems to be missing from the "collection"). Patch attached, enables CAM_FIRMWARE_MEMINFO  for all VxWorks ports which support it.
I chose not to commit this without consent, as it has impact on many ports and the only one I can test is the Ixus65.

Perhaps add the stubs_min.S values with a comment that it is untested and to enable the option in platform_camera.h to test.
Add the values in platform_camera.h commented out with instructions to enable & test.

That way the info is not lost; but won't break any existing ports.

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)

Re: Adding new cameras, applying patches into trunk (with source code prepared)
« Reply #1002 on: 17 / February / 2013, 21:32:53 »
Added in revision 2581 (trunk only).
thnks !
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline nafraf

  • *****
  • 1308
Re: Adding new cameras, applying patches into trunk (with source code prepared)
« Reply #1003 on: 19 / February / 2013, 04:11:00 »
a810 and a1300
  • stubs_entry_2.S cleanup
  • platform_camera.h
        - Duplicated CAM_USES_ASPECT_CORRECTION was deleted
        - CAM_AF_LED was defined
  • lib.c
        - Unused variables were deleted
        - shutdown_soft() was deleted
        - camera_set_led() revised
        - _LockAndRefresh() and _UnlockAndRefresh() replaced by _ScreenLock() and _ScreenUnlock() respectively.
  • stubs_min.S: some_flag_for_af_scan was defined.
  • main.c:
        - Unused variable deleted
  • notes.txt updated

a1300 only
  • CAM_LOAD_CUSTOM_COLORS enabled, CAM_BITMAP_PALETTE=13
   
a810 only
  • CAM_PROPSET changed to 5

a1300 was updated with changes done to a810 (BETA), so A1300 was marked as BETA release.

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: Adding new cameras, applying patches into trunk (with source code prepared)
« Reply #1004 on: 19 / February / 2013, 05:42:26 »
a810 and a1300
  • stubs_entry_2.S cleanup
  • platform_camera.h
        - Duplicated CAM_USES_ASPECT_CORRECTION was deleted
        - CAM_AF_LED was defined
  • lib.c
        - Unused variables were deleted
        - shutdown_soft() was deleted
        - camera_set_led() revised
        - _LockAndRefresh() and _UnlockAndRefresh() replaced by _ScreenLock() and _ScreenUnlock() respectively.
  • stubs_min.S: some_flag_for_af_scan was defined.
  • main.c:
        - Unused variable deleted
  • notes.txt updated

a1300 only
  • CAM_LOAD_CUSTOM_COLORS enabled, CAM_BITMAP_PALETTE=13
   
a810 only
  • CAM_PROPSET changed to 5

a1300 was updated with changes done to a810 (BETA), so A1300 was marked as BETA release.


Added in revision 2584.

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 nafraf

  • *****
  • 1308
Re: Adding new cameras, applying patches into trunk (with source code prepared)
« Reply #1005 on: 19 / February / 2013, 19:30:37 »
a3400 101a
* Remove duplicated CAM_USES_ASPECT_CORRECTION definition in platform_camera.h
* vid_get_viewport_live_fb() implemented using viewport_buffers and active_viewport_buffer
* EXMEM_BUFFER_SIZE = 1MB
* Unused variables deleted
* a3400 101a ready to autobuild


*

Offline nafraf

  • *****
  • 1308
Re: Adding new cameras, applying patches into trunk (with source code prepared)
« Reply #1006 on: 20 / February / 2013, 18:11:36 »
a3200 newloader and unused variables deletion in main.c
tested by ricardo28 on 3200 100d.  Thanks

*

Offline nafraf

  • *****
  • 1308
Re: Adding new cameras, applying patches into trunk (with source code prepared)
« Reply #1007 on: 21 / February / 2013, 22:01:31 »
Small patch to fix some errors reported by cppcheck. 

Code: [Select]
[core/gps.c:1175]: (error) Buffer is accessed out of bounds.
=> gpx_name[17] resized to gpx_name[30] to store sprintf(gpx_name, "A/GPS/Logging/%02d_%02d-%02d_%02d.gpx",...)

[core/gps.c:1339]: (error) Resource leak: fp
=> fclose(fp) missing

[core/gui_script.c:157]: (style) Variable 'i' is assigned a value that is never used.
[core/gui_script.c:186]: (style) Variable 'i' is assigned a value that is never used.
[core/gui_script.c:507]: (style) Unused variable: i

[core/shooting.c:1512]: (style) Same expression on both sides of '||'.

Re: Adding new cameras, applying patches into trunk (with source code prepared)
« Reply #1008 on: 21 / February / 2013, 23:00:22 »
Small patch to fix some errors reported by cppcheck. 
You could be about to become very very busy ....  ;)
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: Adding new cameras, applying patches into trunk (with source code prepared)
« Reply #1009 on: 22 / February / 2013, 03:19:55 »
a3400 101a
* Remove duplicated CAM_USES_ASPECT_CORRECTION definition in platform_camera.h
* vid_get_viewport_live_fb() implemented using viewport_buffers and active_viewport_buffer
* EXMEM_BUFFER_SIZE = 1MB
* Unused variables deleted
* a3400 101a ready to autobuild


a3200 newloader and unused variables deletion in main.c
tested by ricardo28 on 3200 100d.  Thanks
Small patch to fix some errors reported by cppcheck. 

Code: [Select]
[core/gps.c:1175]: (error) Buffer is accessed out of bounds.
=> gpx_name[17] resized to gpx_name[30] to store sprintf(gpx_name, "A/GPS/Logging/%02d_%02d-%02d_%02d.gpx",...)

[core/gps.c:1339]: (error) Resource leak: fp
=> fclose(fp) missing

[core/gui_script.c:157]: (style) Variable 'i' is assigned a value that is never used.
[core/gui_script.c:186]: (style) Variable 'i' is assigned a value that is never used.
[core/gui_script.c:507]: (style) Unused variable: i

[core/shooting.c:1512]: (style) Same expression on both sides of '||'.

All added in revisions 2585 - 2590 (trunk & release-1.1).

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)

 

Related Topics


SimplePortal © 2008-2014, SimplePortal