Lens info properties events in DryOS - DSLR Hack development - CHDK Forum

Lens info properties events in DryOS

  • 2 Replies
Lens info properties events in DryOS
« on: 29 / June / 2009, 10:22:52 »
I've figured out how to register property slaves in DryOS on my 5D Mark II so that callbacks are made into my code when ever other threads change properties.  This is sort of like a publish/subscribe model so that threads that depend on certain other parameters aren't tightly coupled by polling memory locations for changes.

So far I have determined these properties with my 70-200 f/4L and 20 mm f/1.8:
Code: [Select]
0x80000006: Aperture. 20 == f/1.8, 40 == f/4.0, 88 = f/32?  Steps by 4 each click of the wheel
0x8000002d: Aperture (same as 0x80000006)
0x80000036: Aperture, but data is always 0x20058, except when AE-lock button is pressed
Code: [Select]
0x80000005: Shutter speed. 96 == 1/30, 104 = 1/60, 120 = 1/250, 152 = 1/4000.  Steps by 4 per click of the wheel
0x8000002c: Same as 0x80000005
0x80000035: Shutter, but data is always 0x600098, except when AE-lock button is pressed
Code: [Select]
0x80000007: ISO.  72 == ISO100, 80 == ISO200.  Steps by 8 per click
0x8000002e: Same as 0x80000007
0x80000003: Drive. 0 == normal, 1 == auto, 16 == 2 second delay, 17 == 10 second delay
0x8000000a: AF selection (values unknown, looks like a bitmask of points?)
0x8000000d: White balance (0-7)
0x8000000e: White balance in kelvin (when WB==K)
I need to compare the aperture values against different lenses to see if there is some correlation between the range of values and the range of lens apertures, or perhaps the focal length.  When the mode dial is turned, properties are emitted for just about every parameter, but the screen is also redrawn so I don't have an easy way to read them yet.

The lens name is stored as a string in 0x2F3E0.  I have not yet found a numeric value that gives the current lens parameters, but am still looking.  I hope there is a property that is emitted when the focal length or focus distance is changed so that this information can be updated onscreen.

Property 0x80030014 is emitted periodically at about 1 Hz. The value is mostly constant and doesn't seem to correspond to focal length or zoom. It changes sometimes, but I have not determined what causes the changes.

The properties in the 0x800500xx range seem to be most promising. They are emitted at about 2-4 Hz and may be key to tracking the lens focal length and focus distance.

Re: Lens info properties events in DryOS
« Reply #1 on: 07 / July / 2009, 07:39:58 »
I've determined that PROP_LV_LENS (0x80050000) contains the current focal length and focus distance at offsets 0x2C and 0x2E as little-endian 16-bit integers.  Last night I shot a low-quality video showing the values as they are read from my 70-200 mm f/4 L lens:


Offline PhyrePhoX

  • *****
  • 2254
  • make RAW not WAR
    • PhyreWorX
Re: Lens info properties events in DryOS
« Reply #2 on: 07 / July / 2009, 08:17:41 »
i wish i could help you. got a spare 5dmkII? great progress!


Related Topics