1. Luaj requires to load Lua script and call it for declare functions, etc. Currently, I'm calling main.lua, but it starts to chdkptp itself, with calls to dngcli.init_cli(), etc. i.e. many things that not need to my framework. Could you move startup code that initializes some thing and includes all required lua files("fsutil=require'fsutils'") into separate file (probably init.lua ?) ? After that, main.lua can just include this startup code and run usual methods. I will use init.lua, then will get required function and call from java. main.lua will not be loaded in my code, but will be still used in chdktptp.
2. It would be good all functions (that can be called in chdkptp from java) as separate functions with table parameters. I.e. something like this:function remoteshoot(params) if (params.raw) ... if (params.isomode>200) ......But I understand that is big changes. I will send just array with text parameters yet. But how can I get remoteshoot function ? I see cli:add_commands but I don't know Lua so good to understand hot to get function by name. Could you please to write me simple Lua script for just get and call 'remoteshoot' function ? Somethins like : func = table.get('remoteshoot') func(['-raw','-isomode=100'])
cli.names.help:func({v=true,'help'})
3. If capture_get_data_pcall throws some error, script just dumps this error and continues to work. I.e. I can't know from my code was remoteshoot processed good or not. Is it possible to change code somehow(additional error throing or status return) for be able to check status on the remoteshoot function end ?
1. Remote shooting works better than local storage. I fixed one issue in libusb - buffer size for receive data. It was 512 bytes in the usb4java, like USB reported. As result, transfer required up to 5 seconds for raw file. I changed packet size for 16KiB, like in chdkptp, and it works good. Is it correct behavior ? Did you make something special for setup buffer size in chdkptp ?
2. Full remote shooting(with jpeg and raw transfer) requires 3.8 seconds. Is there any way to increase speed ? You can see full log in attachment, but below is short summary:
Ixus160: 100ms: rs_init call, then rlib_shoot_init_exp call2100ms: waiting for capture_ready for raw file (on the end, it waits about 250ms between checks)
900ms: raw file transfer
500ms: waiting for capture_ready for jpeg file
I'm not sure which buffer sizes you are referring to. chdkptp uses a 2 MB buffer for reads in a given transaction (PTPCAM_USB_URB)There is also the max packet size stuff in init_ptp_usb, which is typically 512.
You can change the polling behavior. See chdku.lua con_methods:wait_status. The default is to poll with increasing delays, to make fast operations will return quickly but not use excessive camera CPU polling on longer ones. The polling related wait_status options are passed through capture_get_data options, but aren't exposed as CLI options.
A lot of the 2100ms is probably used by the camera pre-shoot process. If you don't need to re-focus and re measure exposure between each shot, you can do things a lot faster. If you just want to shoot a burst, -cont and -quick options give you ways to do this. If you want to control the shots individually, rsint is an example.If you do need to need AF and/or AE, it's possible some settings will be a bit quicker, but I wouldn't expect big gains. If you can set focus in advance you could try AFlock or set_mf.
My goal is to setup camera into some predefined state after power on.
Quote from: alex73 on 29 / June / 2015, 15:46:10My goal is to setup camera into some predefined state after power on.There is a further option. Read this thread: UI propertiesmsl
Started by reyalp « 1 2 ... 110 111 » General Discussion and Assistance
Started by waterwingz General Discussion and Assistance
Started by dmitrys General Discussion and Assistance
Started by nod5 General Discussion and Assistance
Started by Caefix General Discussion and Assistance