changelog of trunk including comments / devtalk - page 10 - General Discussion and Assistance - CHDK Forum

changelog of trunk including comments / devtalk

  • 289 Replies
  • 166781 Views
*

Offline reyalp

  • ******
  • 12793
Re: changelog of trunk including comments / devtalk
« Reply #90 on: 23 / April / 2011, 21:52:26 »
Advertisements
In reference to http://chdk.setepontos.com/index.php?topic=6321.0 and http://chdk.setepontos.com/index.php?topic=650.msg64898#msg64898

changeset 1151 changes the size of the dirent buffer to 64 bytes for dryos R39 (and later).

If your camera was affected in previous builds, please report what the current autobuild does.
Don't forget what the H stands for.

Re: changelog of trunk including comments / devtalk
« Reply #91 on: 23 / April / 2011, 23:22:23 »
If your camera was affected in previous builds, please report what the current autobuild does.
Seems to fix the "File Browser" issues but now the camera starts up showing "No Image". (IXUS120-SD940).

Its late and I have no doubt missed something but that's what I'm seeing right now.


Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline reyalp

  • ******
  • 12793
Re: changelog of trunk including comments / devtalk
« Reply #92 on: 23 / April / 2011, 23:26:07 »
If your camera was affected in previous builds, please report what the current autobuild does.
Seems to fix the "File Browser" issues but now the camera starts up showing "No Image". (IXUS120-SD940).
So you start the camera with images on it, but it shows "no image" ?  and the old build don't ?
Don't forget what the H stands for.

*

Offline reyalp

  • ******
  • 12793
Re: changelog of trunk including comments / devtalk
« Reply #93 on: 24 / April / 2011, 00:10:36 »
In changeset 1152 I've modified the directory related functions for dryos so that readdir on separate DIR pointers do not step on each other. This may resolve some of the problems reported with the raw purge function.

readdir should now behave as described on http://pubs.opengroup.org/onlinepubs/009695399/functions/readdir.html
Quote
The pointer returned by readdir() points to data which may be overwritten by another call to readdir() on the same directory stream. This data is not overwritten by another call to readdir() on a different directory stream.
« Last Edit: 31 / January / 2012, 01:04:56 by reyalp »
Don't forget what the H stands for.


*

Offline reyalp

  • ******
  • 12793
Re: changelog of trunk including comments / devtalk
« Reply #94 on: 24 / April / 2011, 17:23:11 »
In changeset 1155 I've updated the PTP protocol to version 2. This is incompatible with the previous version, meaning that existing clients will not be fully compatible. Upload, download, and lua that does not involve returns/messages with tables should still work.

A patch to chdkde ptpcam and a updated win32 binary are attached. ptpcamgui will probably work unchanged with this binary, but I haven't tested it.

Changes
- tables messages + returns are now identified with PTP_CHDK_TYPE_TABLE. The table is still returned as a string formatted by usb_msg_table_to_string, this just allows clients reliably to distinguish tables from strings.
- empty strings are returned with msg.size 0 instead of being silently dropped.
- errors in usb_msg_table_to_string now return an PTP_CHDK_S_MSGTYPE_ERR for returns, or throw a lua error for user messages.
Don't forget what the H stands for.

Re: changelog of trunk including comments / devtalk
« Reply #95 on: 24 / April / 2011, 17:32:51 »
So you start the camera with images on it, but it shows "no image" ?  and the old build don't ?
Looks like I've got this discussion going in another thread too so I'll just link to it here :
http://chdk.setepontos.com/index.php?topic=6321.msg65413#msg65413
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline reyalp

  • ******
  • 12793
Re: changelog of trunk including comments / devtalk
« Reply #96 on: 08 / May / 2011, 19:32:12 »
In changest 1178 I've added get_meminfo for lua.
vxworks and dryos cameras without CAM_FIRMWARE_MEMINFO defined currently fall back to the malloc loop

I'd still like a few more dryos testers for CAM_FIRMWARE_MEMINFO before I turn it on globally. The following have been tested and are now on by default: a590, sx20, g12, sx30 and d10.

I plan to add memPartFindMax for vxworks. I'm also going to look into adding the vxworks exmem functions to the sigfinder, it looks like they should match well.

get_meminfo works as follows:
meminfo=get_meminfo([heapname])
get camera memory information
heapname="system" or "exmem" if not given, meminfo is returned for heap used by CHDK for malloc
meminfo is false if the requested heapname isn't valid ("exmem" when exmem is not enabled, or unknown)
otherwise, a table of the form
meminfo = {
    name -- string "system" or "exmem"
    chdk_malloc -- bool, this is the heap used by CHDK for malloc
    chdk_start -- number, load address of CHDK
    chdk_size -- number, size of CHDK image
    -- all the following are numbers, will not be set if not available
    start_address
    end_address
    total_size
    allocated_size
    allocated_peak
    allocated_count
    free_size
    free_block_max_size
    free_block_count
}
NOTES
* under vxworks and cameras without GetMemInfo only the only valid fields
  for the system heap will be those defined by chdk and free_block_max_size
* the meaning of fields may not correspond exactly between exmem and system

edit:
there are some issues with the allocated_size and allocated_peak values in exmem.
« Last Edit: 08 / May / 2011, 22:00:34 by reyalp »
Don't forget what the H stands for.

*

Offline reyalp

  • ******
  • 12793
Re: changelog of trunk including comments / devtalk
« Reply #97 on: 09 / May / 2011, 01:37:25 »
In changeset 1179 I've started implementing meminfo for vxworks

It turns out there is a function in vxworks called memPartInfoGet, which returns some information similar to GetMemInfo. This is a 100% match in finsig for all cameras except ixus40, where it doesn't exist at all. I made ixus40 fall back to memPartFindMax.

Using memPartInfoGet is controlled CAM_FIRMWARE_MEMINFO on vxworks. Right now, it is only enabled for a540. To use it, you also need to add sys_mempart_id to stubs_min.S. Note that this is not the same value listed in http://chdk.setepontos.com/index.php?topic=2831.msg29044#msg29044 ... Fudgey was finding the value of the variable, while stubs_min.S needs the address of the variable. The end result is the same, but I thought it was clearer to keep it in stubs_min.S. This address is very easy to find, there are a bunch of functions that load it, then call memPart* functions.

I'll add the stubs_min.S stuff as I get time. Like the dryos cameras, I'd like to get tests on a few models before turning it on globally.

I also added stubs for vxworks exmem_alloc. exmem seemed to work fine on a540. Not all the matches are 100%, but I suspect it will be fine on most if not all a cameras.
Don't forget what the H stands for.


*

Offline reyalp

  • ******
  • 12793
Re: changelog of trunk including comments / devtalk
« Reply #98 on: 04 / July / 2011, 19:01:41 »
In changeset 1224 I changed the custom timer mode hack into a camera.h define, and updated all the cameras that previously had an ifdef in generic shooting. Also enabled for ixus95_sd1200

I'm guessing many other recent cameras need this...
Don't forget what the H stands for.

*

Offline reyalp

  • ******
  • 12793
Re: changelog of trunk including comments / devtalk
« Reply #99 on: 29 / August / 2011, 01:49:58 »
In changeset 1306 I've added support for accessing arbitrary sized propcases from lua.

usage
Code: [Select]
val=get_prop_str(prop_id,length)
get the value of a propertycase as a string
numeric values may be extracted using string.byte or or the binstr.lua module
returns the value as a string, or false if the underlying propcase call returned non-zero

Code: [Select]
status=set_prop_str(prop_id,value)
set propertycase value as a string. Length is taken from the string
numeric propcase values may be assembled by setting byte values using string.char or the binstr module
status: boolean - true if the underlying propcase call returns 0, otherwise false

Both of the above use lua strings, which can contain any sequence of bytes.

Because many of the values you'd want to get/set at are numbers or arrays of numbers, I've also added a lua helper module called binstr to convert to and from strings for use with the above.

The module has 3 function
Code: [Select]
string=binstr.pack(value[,size])
value is a number or array of numbers
size is the number bytes to use from each number, default is 4, valid values are 1-4
returns a lua string

num=binstr.getnum(str[,size[,pos]])
extract size bytes from string into number, starting at pos
size defaults to 4,
pos defaults to 1
returns a number (without sign extension) or nil if pos is outside the string

array=binstr.unpack(str[,size])
split every size bytes of str into numbers and return as an array
size defaults to 4

usage
Code: [Select]
bs=require('binstr')
wbdata=bs.unpack(get_prop_str(0x10d,0x1c)) -- return propset 3 white balance as 7 ints

In all cases, the numbers are assumed to be little endian
Don't forget what the H stands for.

 

Related Topics