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

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

  • 1685 Replies
  • 845369 Views
Re: Adding new cameras, applying patches into trunk (with source code prepared)
« Reply #60 on: 12 / December / 2009, 21:02:39 »
Advertisements
I did some cleaning up and fixing of some of the menu operation.
The zoom in/zoom out button could be used to alter the step size for MENUITEM_INT items.
The zoom in/out could also be held to control step size for both MENUITEM_INT and MENUITEM_ENUM items, but this was in conflict with the above operation, so I removed and modified.

zoom in/zoom out increases/decreases the step size: 1,10,100,1000,10000 for MENUITEM_INT, 1,3,9,27,81 for MENUITEM_ENUM.
I also extended the DISPLAY usage to all cameras.  Now it alters the step size as per zoom out for both and recycles back to 1 at the top, so this can be used for cams without zoom button (I figured it may as well also extend to cams with zoom as well).
The step values are saved, so they don't reset back to 1 when moving around in the menu.
I also found the display of the step size at the top was inconsistent.  it wouldn't clear itself when moving from item to item even though it had been changed.  There were also some other display issues with it.   Now it displays permanently and displays the stem to reflect the menuitem type (int or enum, for others it is blank).
The half-shoot was also used to be held for step size alteration.  I modified it so it is a toggle (for all cams) that alters the step size by a factor of 1 or 2.  it also updates the step size display above to reflect this change.
There were some other minor cleanup issues I did as well.
Please have a look at it and see if it is acceptable to be commited or if some alterations may be required.
 


*EDIT*
1. Slight error in the patch, I had one line from another item I was working on that would make it not work.

2. Made another addition to the menu operation.  On the MISC tab there is now an item to select "Jogdial action".  You can choose "KEY_U/D" (default) which is the previous operation, jogdial moves up/down menu items.  Or you can select "KEY_L/R" and the jogdial will change values like the LEFT/RIGHT KEY operation. This have been enclosed with "#if CAM_HAS_JOGDIAL" so it's only included on cams with jogdials.  State is also saved to config file.
« Last Edit: 14 / December / 2009, 14:49:12 by barberofcivil »

*

Offline reyalp

  • ******
  • 14125
Re: Adding new cameras, applying patches into trunk (with source code prepared)
« Reply #61 on: 19 / December / 2009, 20:29:11 »
barberofcivil,
Thanks for the work, and sorry it's taken me a while to get to this.

I'm going to continue the discussion in a new thread, since this looks a bit more involved than something I can just apply with minor adjustments. http://chdk.setepontos.com/index.php/topic,4636.0.html

As a general comment, I prefer more, smaller patches when stuff isn't directly related. Especially true if one part is clearly a bug fix and another is a behavior change or new feature. The less I have to think about a patch, the quicker it gets applied :) It's OK for one patch to depend on another, although you won't be able to make them in tortoise until the preceding ones are committed. You can do it with regular diff if you want.
Don't forget what the H stands for.

*

Offline ERR99

  • ****
  • 339
Hello,

if possible, please add this inital port for the G11 into trunk.

Caused by the new dryos version of the G11, there are several patches to the CHDK core neccessary ( i merged this changes from from RaduP SD980 porting thread, they are marked with #ifdef CAM_DRYOS_2_3_R39). Also a new CAM_BITMAP_PALETTE 4 (gui_draw.h) was necessary. The PropSet has also changed, so i added propset 3.

I also added two bugfixs in gui_menu.c, to fix a crash in the script menu of the G11. They are marked with  #if defined (CAMERA_g11) in gui_menu.c. Without this fixes, the G11 port also works,  but the Script menu will crash if scripts with long titlenames are loaded and/or they will be left overs on the display (see http://chdk.setepontos.com/index.php/topic,4647.msg46080.html#msg46080). I also added a small bugfix in script.c (search for ERR99) to fix a sporadic crash of the camera at startup (free() was sometimes called on an invalid pointer in script.c, caused by missing initalisation).

If there are any questions left regarding integration of this port to the trunk, let me know.

*

Offline reyalp

  • ******
  • 14125
Great work ERR99. Unfortunately I'm totally swamped with real work, so I won't be able to merge this into the trunk for a while. Possibly next weekend if I'm really lucky.

Maybe someone else will be able to do this, it would be good to get it in before code rot sets in :)
Don't forget what the H stands for.

*

Offline fe50

  • ******
  • 3152
  • IXUS50 & 860, SX10 Star WARs-Star RAWs
    • fe50
@ERR99
I'm also a bit busy atm, but i'll have a look tomorrow today   ;)

*

Offline fe50

  • ******
  • 3152
  • IXUS50 & 860, SX10 Star WARs-Star RAWs
    • fe50
if possible, please add this inital port for the G11 into trunk.
Done, changeset #871

*

Offline ERR99

  • ****
  • 339
Re: Adding new cameras, applying patches into trunk (with source code prepa
« Reply #66 on: 12 / February / 2010, 09:36:14 »
Hello,

please update propcase.lua with the attached one (added proset 3).
Scripts wont work correctly without this on the G11.

*

Offline fe50

  • ******
  • 3152
  • IXUS50 & 860, SX10 Star WARs-Star RAWs
    • fe50
Re: Adding new cameras, applying patches into trunk (with source code prepared)
« Reply #67 on: 13 / February / 2010, 06:22:01 »
please update propcase.lua with the attached one (added proset 3).
Scripts wont work correctly without this on the G11.
Done, changeset #874


*

Offline ERR99

  • ****
  • 339
Hello,
here are the sources for the G11 1.00L firmware support. After a week of testing, there are no major bugs reported, so i thinks its ready for integration. ;)

 

Related Topics


SimplePortal © 2008-2014, SimplePortal