supplierdeeply

new branch - CHDK : Elf Edition - Developers wanted

  • 302 Replies
  • 39686 Views
  • Publish
    Re: Re: new branch - CHDK : Elf Edition - Developers wanted
    « Reply #240 on: 18 / January / 2012, 01:16:29 »
    Advertisements
    changeset 1569 reuses a conf number in core/conf.c

    Code: [Select]
        CONF_INFO(248, conf.charmap_file,        CONF_CHAR_PTR,   ptr:"", NULL),

    The last one should be 250.
    Fixed. r1576
    it looks like something is possibly clobbering one of the two USB remote conf variables at 248 or 249.   I'll look closer tomorrow but is there any chance 250 is overwriting them when the file is stored ?

    *

    Offline philmoz

    • *****
    • 2936
      • Photos
  • Publish
    Re: new branch - CHDK : Elf Edition - Developers wanted
    « Reply #241 on: 18 / January / 2012, 03:42:13 »
    it looks like something is possibly clobbering one of the two USB remote conf variables at 248 or 249.   I'll look closer tomorrow but is there any chance 250 is overwriting them when the file is stored ?

    I've gone back over the code changes and I can't see any reason why this would happen - that's not to say there isn't a problem with my config file changes; but it's not obvious. If you can find any pattern to the problem that would help a lot.

    The only time I've problems with menu settings changes seeming to get lost is if I turn off the camera before exiting the menu or ALT mode (after changing a setting). You can also get this if you use chdkptp to reboot the camera.

    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)

  • Publish
    Re: new branch - CHDK : Elf Edition - Developers wanted
    « Reply #242 on: 18 / January / 2012, 21:41:25 »
    I've gone back over the code changes and I can't see any reason why this would happen - that's not to say there isn't a problem with my config file changes; but it's not obvious. If you can find any pattern to the problem that would help a lot.
    Thanks philmoz.  That saved me some time looking there.  I've tracked it down finally,  its an interesting one. 

    I finally noticed that with my testing version, if I had Remote Enabled when I reset the camera it would crash.  If I deleted the CCDHK.CFG file from the SD card (and thereby losing the Remote Enabled setting), then CHDK would load normally again. Hence my concern about config.xxx values.

    Turns out this is only a problem when I have the OSD debugging code in the USB remote modules compiled in.  That was not a problem when I was using the stable branch but turns out to cause the above mentioned problem when used in the main dev ELF trunk.

    I tracked it down to this line :

    Code: [Select]
    draw_string(2,16,buf,MAKE_COLOR(COLOR_YELLOW,COLOR_RED));

    If I commented out the every draw_string, this work fine. So I inserted a one time 1 second delay at the start of the usb remote OSD debug code and re-enabled the draw_strings.

    Bingo.

    It appears that the USB remote debug print code was running too early in the startup sequence - before the various things necessary to display on the LCD are setup.  Interesting that this was not a problem in the stable branch though.


  • Publish
    Re: new branch - CHDK : Elf Edition - Developers wanted
    « Reply #243 on: 18 / January / 2012, 23:06:43 »
    A menu UI niggle I just noticed: submenus that are loaded as modules can only be opened using the set button, whilst permanent submenus can be opened via both set and right buttons.


  • Publish
    Re: new branch - CHDK : Elf Edition - Developers wanted
    « Reply #244 on: 18 / January / 2012, 23:22:26 »
    Quick patch for the menu UI issue attached. (against trunk)
    « Last Edit: 18 / January / 2012, 23:25:02 by pelrun »

    *

    Offline philmoz

    • *****
    • 2936
      • Photos
  • Publish
    Re: new branch - CHDK : Elf Edition - Developers wanted
    « Reply #245 on: 19 / January / 2012, 00:27:05 »

    It appears that the USB remote debug print code was running too early in the startup sequence - before the various things necessary to display on the LCD are setup.  Interesting that this was not a problem in the stable branch though.


    You have the debug display code in the function being called from the kyeboard task.
    It would be better if you could move the debug display code to a seperate function and call this from the spytask task, which is where most of the gui display stuff lives.

    If that's not possible you could add a variable that gets set after the call to gui_init in core_spytask that lets your usb remote code know it is safe to display debug info.

    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)

  • Publish
    Re: new branch - CHDK : Elf Edition - Developers wanted
    « Reply #246 on: 19 / January / 2012, 00:33:10 »
    You have the debug display code in the function being called from the kyeboard task.
    It would be better if you could move the debug display code to a seperate function and call this from the spytask task, which is where most of the gui display stuff lives.

    If that's not possible you could add a variable that gets set after the call to gui_init in core_spytask that lets your usb remote code know it is safe to display debug info.
    Yup - I added a time delay - the debug code is the usual "brute force" thing most debug displays are. It's built out by default.

    I suppose a proper  "usb remote" debug display might be helpful if others want to add logic modules.  I'll put it on the "to do" list.  I was also going to add something that modified what the USB remote OSD icon or text shows on a half press / full press to make it easier to see what the camera is doing.
    « Last Edit: 19 / January / 2012, 00:35:03 by waterwingz »

    *

    Offline philmoz

    • *****
    • 2936
      • Photos
  • Publish
    Re: new branch - CHDK : Elf Edition - Developers wanted
    « Reply #247 on: 19 / January / 2012, 02:39:24 »
    Quick patch for the menu UI issue attached. (against trunk)

    Thanks for that, fixed in changeset 1579.

    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)


    *

    Offline philmoz

    • *****
    • 2936
      • Photos
  • Publish
    Re: new branch - CHDK : Elf Edition - Developers wanted
    « Reply #248 on: 19 / January / 2012, 03:50:26 »
    Changeset 1580 in the main trunk contains a re-work of the Zebra module code.

    This is to make the zebra module platform independent.

    It also include some re-organisation of the code and some additional comments.

    Tested on G12, SX30, SX40, IXUS310 and IXUS700.

    I'm fairly confident it functions equivalently to the old code; but I may have missed something.

    Please report any zebra issues with this build here.

    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)

  • Publish
    Re: new branch - CHDK : Elf Edition - Developers wanted
    « Reply #249 on: 23 / January / 2012, 09:53:59 »
    I do not test reworked zebra, but I have comment about module-related code.

    Purpose of API_VERSION's is strictly definition of data structure. If something is changed then version should be changed.

    camera_info and camera_screen structures was changed so their version should be changed.
    Because changed structures are backward-compatible minor version numbers should be changed.
    Reworked zebra module should check this new versions as requirement instead current 1.0.

    camera_screen is very common module which is used in all modules so to avoid multiple checks its version is combined with common gui_version.common_api. So minor version of this variable should be increased.

    This changes will prevent possible usage of new module with old core and this what API version system is for.

     

    Related Topics