eos M10 port - page 19 - DryOS Development - CHDK Forum

eos M10 port

  • 327 Replies
  • 250940 Views
*

Offline reyalp

  • ******
  • 14080
Re: eos M10 port
« Reply #180 on: 02 / April / 2018, 22:17:06 »
Advertisements
difference that get_user_tv96 is immediately updated while get_tv96 requires a shoot_half press button to update.
This is normal behavior. The "user" values should correspond UI values in modes where manual control is allowed in the canon firmware (M, Tv, Av). The user values are only effective in those modes. The normal tv value is only updated on half shoot, either from the camera auto-exposure, or from the user value.
Quote
Anyway if I set TV with set_tv96_direct I have no way to read back the value from the camera because no function reads the override value.
This is also normal behavior, the get_ function just returns the propcase, which only updates on half press.

If you want to keep track of the value you set, you should keep track of it yourself.

Note that CHDK overrides are one-shot: The override is applied in the next half press (or immediately, if the camera is already in half press) and does not affect subsequent shots.
Quote
Then the a final note: the set_tv96_direct setting seems to work correctly only with the shoot function, if I use the press("shoot_full") the override doesn't apply.
It should apply in all cases, however, if you press shoot_full without pressing shoot_half and waiting for the camera to be ready (e.g. "press'shoothalf' repeat sleep(10) until get_shooting()" ), this takes a different code path. It's possible the override doesn't work correctly in this case.
Don't forget what the H stands for.

*

Offline srsa_4c

  • ******
  • 4451
Re: eos M10 port
« Reply #181 on: 03 / April / 2018, 15:16:01 »
I have checked in the Tv related corrections.
Then the a final note: the set_tv96_direct setting seems to work correctly only with the shoot function, if I use the press("shoot_full") the override doesn't apply.
It should apply in all cases, however, if you press shoot_full without pressing shoot_half and waiting for the camera to be ready (e.g. "press'shoothalf' repeat sleep(10) until get_shooting()" ), this takes a different code path. It's possible the override doesn't work correctly in this case.
I can now confirm that overrides (tried Tv and Sv) do not apply in "quick press" cases...

*

Offline reyalp

  • ******
  • 14080
Re: eos M10 port
« Reply #182 on: 03 / April / 2018, 16:44:26 »
Split discussion of python/chdkptp code to https://chdk.setepontos.com/index.php?topic=13394.0 since it's not directly related to the M10 port.
Don't forget what the H stands for.

*

Offline srsa_4c

  • ******
  • 4451
Re: eos M10 port
« Reply #183 on: 05 / April / 2018, 15:20:34 »
Liveview magnification (digital zoom) can be activated via the following Lua command:
post_levent_to_ui(0x11ea,1) : "5x" zoom
post_levent_to_ui(0x11ea,0) : normal view
When activated this way, the UI differs slightly from the usual (the one that is invoked via touchscreen): four directional arrows are added to the overlay (they are not coupled with touch actions).


Re: eos M10 port
« Reply #184 on: 06 / April / 2018, 09:36:54 »
Liveview magnification (digital zoom) can be activated via the following Lua command:
post_levent_to_ui(0x11ea,1) : "5x" zoom
post_levent_to_ui(0x11ea,0) : normal view
When activated this way, the UI differs slightly from the usual (the one that is invoked via touchscreen): four directional arrows are added to the overlay (they are not coupled with touch actions).

Oh wow, thank you, this is very helpful. The zoom in libgphoto2 is with the same interface (with the four arrows) so I think this is the same function.
While if I execute

Code: [Select]
post_levent_to_ui(0x11ea,1)
press("shoot_half")
repeat
   sleep(10)
until get_shooting()
return

I obtain the same interface as the zoom from the touch screen.

Do you think the x10 and the movement of the area of zoom will be possible too?
Thanks again.
« Last Edit: 06 / April / 2018, 09:48:38 by burglar »

*

Offline srsa_4c

  • ******
  • 4451
Re: eos M10 port
« Reply #185 on: 07 / April / 2018, 08:09:16 »
so I think this is the same function.
Yes, that's what the zoom PTP handler does (among other things).
Quote
Do you think the x10
That's possible:
You need to execute this once per session:
call_event_proc("UI.CreatePublic")
After that, you can execute
call_event_proc("PTM_SetCurrentItem",0x80b8,n)
where n can be: 0 for 1x zoom, 1 for 5x zoom, 2 for 10x zoom. Other values crash the camera. For this to be effective, the zoom interface has to be made visible beforehand.
For more info on "UI properties" see this thread.
Quote
and the movement of the area of zoom will be possible too?
That part seems more difficult.
From what I can tell, there are two methods:
- swipe the view
- moving the AF(?) rectangle and then magnify that area
Both are touch operations (which I don't know how to simulate). The latter method works in the app too, which is likely why the PTP handlers are there. Perhaps finding out what the app does could help...
« Last Edit: 07 / April / 2018, 08:46:48 by srsa_4c »

Re: eos M10 port
« Reply #186 on: 07 / April / 2018, 09:32:16 »
Quote
You need to execute this once per session:
call_event_proc("UI.CreatePublic")
When I try to execute this it returns the following error:
Code: [Select]
ERROR: call failed:[string "call_event_proc("UI.CreatePublic")"]:1: attempt to call global 'call_event_proc' (a nil value)Looking in the forum it seems that in order to have this function , the CHDK has to be compiled with the "native" calls enabled as described here: http://chdk.wikia.com/wiki/Lua/Lua_Reference/Native_Function_Calls

But I am not sure that I spot the right reason for this error.

*

Offline srsa_4c

  • ******
  • 4451
Re: eos M10 port
« Reply #187 on: 07 / April / 2018, 12:31:49 »
Looking in the forum it seems that in order to have this function , the CHDK has to be compiled with the "native" calls enabled
Either that, or enable it in CHDK menu: miscellaneous stuff -> enable lua native calls.


Re: eos M10 port
« Reply #188 on: 07 / April / 2018, 13:06:44 »
Quote
Either that, or enable it in CHDK menu: miscellaneous stuff -> enable lua native calls.
As usual very helpful, thanks, I enabled it and now I can setup also the x10 zoom.
My astronomical program is becoming very powerful now.

*

Offline srsa_4c

  • ******
  • 4451
Re: eos M10 port
« Reply #189 on: 13 / April / 2018, 15:17:54 »
Do you think the x10 and the movement of the area of zoom will be possible too?
In case this is still of interest, I managed to find a method for moving the magnified area. Unfortunately, it requires calling a firmware routine by address - via call_func_ptr().

Propcase 469 stores 4 signed halfwords (it is 8 bytes long), in the following order:
- x relative position of magnified area (-284 ... +284)
- full width (720)
- y relative position of magnified area (-188 ... +188)
- full height (480)

When the center is magnified, the relative positions above are zero.
I witnessed 'full height' become 408 when I switched to movie mode (16:9), so those numbers likely depend on the current aspect ratio.

The propcase can be read/written using the get_prop_str and set_prop_str commands (see also this and this for their usage).

After setting the propcase, the firmware routine needs to be called, like this:
call_func_ptr(0xfc129eeb,0x10)
That address is valid for all supported firmware versions (110d, 110f, 110g).

This method does not influence the small visual indicator that shows the position of the magnified area. To update that, call_func_ptr(0xfc377789,0x2f,0) needs to be executed additionally (WARNING: this address only valid for fw 110d). This function writes the DSIC entry in camera log.

 

Related Topics